Skip to content

Commit

Permalink
Add flags with default variables for autoscaling and batch version
Browse files Browse the repository at this point in the history
If these valuese are not initialized, the generator code will produce
invalid kubernetes objects when generating manifest files.

In operator mode, the default values were automatically detected.

Signed-off-by: Carl Henrik Lunde <[email protected]>
  • Loading branch information
chlunde committed Dec 16, 2024
1 parent e4536a8 commit 110b03a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cmd/start/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func AddFlags(cmd *cobra.Command) {
cmd.Flags().String("openshift-oauth-proxy-imagestream-ns", "", "The namespace for the OpenShift OAuth Proxy imagestream")
cmd.Flags().String("openshift-oauth-proxy-imagestream-name", "", "The name for the OpenShift OAuth Proxy imagestream")
cmd.Flags().String("platform", v1.FlagPlatformAutoDetect, "The target platform the operator will run. Possible values: 'kubernetes', 'openshift', 'auto-detect'")
cmd.Flags().String(v1.FlagAutoscalingVersion, v1.FlagAutoscalingVersionV2, "The version of the autoscaling API to use. Possible values: "+v1.FlagAutoscalingVersionV2Beta2+", "+v1.FlagAutoscalingVersionV2)
cmd.Flags().String(v1.FlagCronJobsVersion, v1.FlagCronJobsVersionBatchV1, "The version of the cron jobs API to use. Possible values: "+v1.FlagCronJobsVersionBatchV1Beta1+", "+v1.FlagCronJobsVersionBatchV1)

Check warning on line 36 in pkg/cmd/start/main.go

View check run for this annotation

Codecov / codecov/patch

pkg/cmd/start/main.go#L35-L36

Added lines #L35 - L36 were not covered by tests
cmd.Flags().String("es-provision", v1.FlagProvisionElasticsearchAuto, "Whether to auto-provision an Elasticsearch cluster for suitable Jaeger instances. Possible values: 'yes', 'no', 'auto'. When set to 'auto' and the API name 'logging.openshift.io' is available, auto-provisioning is enabled.")
cmd.Flags().String("kafka-provision", "auto", "Whether to auto-provision a Kafka cluster for suitable Jaeger instances. Possible values: 'yes', 'no', 'auto'. When set to 'auto' and the API name 'kafka.strimzi.io' is available, auto-provisioning is enabled.")
cmd.Flags().Bool("kafka-provisioning-minimal", false, "(unsupported) Whether to provision Kafka clusters with minimal requirements, suitable for demos and tests.")
Expand Down

0 comments on commit 110b03a

Please sign in to comment.