kubevirt / cloud-provider-kubevirt

Kubernetes cloud-provider for KubeVirt
Apache License 2.0
73 stars 34 forks source link

kustomize: Remove harcoded "kvcluster" arg value #260

Closed qinqon closed 1 year ago

qinqon commented 1 year ago

The kustomize config that generates the deployment has a harcoded "--cluster-name=kvcluster" arg, this change remove that arg and add it to the config/overlays/kubevirtci with value replaced with an env var

nunnatsa commented 1 year ago

@qinqon - a question: shouldn't we also change the result yaml files under the config/ directory?

qinqon commented 1 year ago

/retest

qinqon commented 1 year ago

@qinqon - a question: shouldn't we also change the result yaml files under the config/ directory?

No we don't need it.

mfranczy commented 1 year ago

/retest

qinqon commented 1 year ago

Looks it's adding the double quotes

1 loadbalancer.go:214] Failed to create LB aa2f4e07d660647dd8c33690f70bd92b: Service "aa2f4e07d660647dd8c33690f70bd92b" is invalid: [metadata.labels: Invalid value: "\"kvcluster\"": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), spec.selector: Invalid value: "\"kvcluster\"": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')]
E0821 15:06:44.038233       1 loadbalancer.go:91] Failed to create LoadBalancer service: Service "aa2f4e07d660647dd8c33690f70bd92b" is invalid: [metadata.labels: Invalid value: "\"kvcluster\"": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), spec.selector: Invalid value: "\"kvcluster\"": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')]
E0821 15:06:44.038263       1 controller.go:289] error processing service default/test-app (will retry): failed to ensure load balancer: Service "aa2f4e07d660647dd8c33690f70bd92b" is invalid: [metadata.labels: Invalid value: "\"kvcluster\"": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), spec.selector: Invalid value: "\"kvcluster\"": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')]
I0821 15:06:44.038454       1 event.go:294] "Event occurred" object="default/test-app" fieldPath="" kind="Service" apiVersion="v1" type="Warning" reason="SyncLoadBalancerFailed" message="Error syncing load balancer: failed to ensure load balancer: Service \"aa2f4e07d660647dd8c33690f70bd92b\" is invalid: [metadata.labels: Invalid value: \"\\\"kvcluster\\\"\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), spec.selector: Invalid value: \"\\\"kvcluster\\\"\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')]"
mfranczy commented 1 year ago

/approve /lgtm

kubevirt-bot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mfranczy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubevirt/cloud-provider-kubevirt/blob/main/OWNERS)~~ [mfranczy] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment