-
Notifications
You must be signed in to change notification settings - Fork 7
feat(cluster-addons): Use clouds.yaml instead of cloud.conf #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,21 @@ | ||
| openstack-cloud-controller-manager: | ||
| secret: | ||
| enabled: true | ||
| name: cloud-config | ||
| create: false | ||
| name: ccm-cloud-config | ||
| create: true | ||
| nodeSelector: | ||
| node-role.kubernetes.io/control-plane: "" | ||
| tolerations: | ||
| - key: node.cloudprovider.kubernetes.io/uninitialized | ||
| value: "true" | ||
| effect: NoSchedule | ||
| - key: node-role.kubernetes.io/control-plane | ||
| effect: NoSchedule | ||
| extraVolumes: | ||
| - name: clouds-yaml | ||
| secret: | ||
| secretName: clouds-yaml | ||
| extraVolumeMounts: | ||
| - name: clouds-yaml | ||
| readOnly: true | ||
| mountPath: /etc/openstack | ||
| cloudConfig: | ||
| global: | ||
| use-clouds: true |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to have this as addon? - error: 'failed to apply object: clusterresourcesets.addons.cluster.x-k8s.io "openstack-scs-1-32-v0-git.0e3e6e8-clouds-yaml"
is forbidden: User "system:serviceaccount:cso-system:cso-controller-manager"
cannot patch resource "clusterresourcesets" in API group "addons.cluster.x-k8s.io"
in the namespace "ciabns2"'
group: addons.cluster.x-k8s.io
kind: ClusterResourceSet
name: openstack-scs-1-32-v0-git.0e3e6e8-clouds-yaml
status: not-synced
version: v1beta1when testing Isn't the |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apiVersion: addons.cluster.x-k8s.io/v1beta1 | ||
| kind: ClusterResourceSet | ||
| metadata: | ||
| name: {{ .Release.Name }}-{{ .Chart.Version }}-clouds-yaml | ||
| spec: | ||
| strategy: "Reconcile" | ||
| clusterSelector: | ||
| matchLabels: | ||
| managed-secret: clouds-yaml | ||
| resources: | ||
| - name: clouds-yaml | ||
| kind: Secret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@garloff to add the cacert it's probably enough to add a second file called
cacert(containing the cacert obviously) and point to that in theclouds.yamlwithclouds.openstack.cacert=/etc/openstack/cacertsince the clouds-yaml secret will be mounted to/etc/openstackfor CCM and CSIThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Questions:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No they will be applied by CAPI as CRS
The dry-run can be removed than use that secret.
Of course, can just be configured in the values.yaml
All these options are available then: https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/openstack-cloud-controller-manager/using-openstack-cloud-controller-manager.md#load-balancer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I can generate a secret that capo can work with:
Note that the
CL_YAML_B64containscacert: /etc/certs/cacertwhich appears to be the place that capo maps it to.I do not see the secrets propagated into the workload cluster yet, so OCCM and friends have no way to access the OpenStack API yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, the helper chart (which we no longer want to use) created a clusterresourceset,, will have to do something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is created as connection between the Cluster and the ClusterResourceSet as soon as a Cluster is created with matching labels
It has the name of the cluster:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, the
clusterSelector.matchLabelsentry is wrong.I apply the label
managed-secret: cloud-configto the cluster, thusmatchLabels.manged-secret: clouds-yamlcan't work. Mystery solved, thanks @jschooneUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I have it working.
I now look for clusterstackrelease status.resources openstack-scs-$VERSION-clouds-yaml and if it exists, we add a label
managed-secret: clouds-yamlinstead ofcloud-configto the cluster, so the CRS can do its matching and works.I renamed the
openstack-workload-cluster-secretand theopestack-crs-secretinto...-newsecretfor the new way in my scripts, so I can handle clusters of both kinds coexisting in the same namespace on the mgmt cluster.Cinder-CSI works out of the box with this, which is nice. (I had to do some patching before ...)
Questions:
clouds.yaml, we have more freedom to configure clusterstackreleases with different settings. This is good.I would like to take the decision which loadbalancer provider I use per cluster, for example.
Is there a way to do this?
cloud.configconfiguration to clusters withclouds.yamlconfiguration, with coexistence of both (in the same mgmt cluster namespace) and with autosubscribe ... I fear we need to create some documentation and/or automation for the upgrade case. Maybe only do this for 1.33.x and leave <= 1.32 alone?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, using the overwrite.yaml, options/variables from the Cluster resource can be passed. We had
We can just set the default to ovn.
We had an approach before with the
workload_loadbalancervariable and adjusting the values.yaml accordingly, see here. But since we didcreate=falsethis was a dummy. Now we are able to use that.Can also be done using the overwrite.yaml. e.g. checking which "managed secret" is used and turning on or off the
createoption depending on that. And yes I would use clouds-yaml in newer versions only.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better would be do create new Cluster Stacks. That would follow the idea of Cluster Stacks and no breaking changes exist which needed to be workarounded.
The whole SCS Cluster Stack can then be deprecated and until it reaches EOL the autosubscribe continues working.
Then it's also more clear there are differences which need to be handled which can easily be documented, such as ORC instead of CSPO or the change to
use-cloudsin the CPO Helm values.So personally I'd prefer to have new Cluster Stacks.
Especially the
use-cloudsthing will be very tricky and breaking.The ORC thing is already implemented, but luckily ORC must be installed anyway since CAPO 0.12 so there nothing breaks.