Skip to content
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

Allow injecting generic-token-kubeconfig secret name into yawol-cloud-controller #87

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions charts/yawol-controller/templates/yawol-cloud-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ spec:
resources:
{{ toYaml .Values.resources.yawolCloudController | indent 10 }}
{{- end }}
{{- if .Values.yawolCloudController.additionalVolumeMounts }}
volumeMounts:
- mountPath: /var/run/secrets/gardener.cloud/shoot/generic-kubeconfig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to remove the settings related to gardener from here.
Because yawol also works without gardener.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid point. In this case, I suggest closing this PR and removing all gardener-related values in a new PR.
The gardener extension should be responsible for injecting all gardener-related values in its controller.

name: kubeconfig
readOnly: true
{{- if .Values.yawolCloudController.additionalVolumeMounts }}
{{ toYaml .Values.yawolCloudController.additionalVolumeMounts | indent 8 }}
{{- end }}
securityContext:
Expand All @@ -89,8 +92,24 @@ spec:
- ALL
dnsPolicy: ClusterFirst
restartPolicy: Always
{{- if .Values.yawolCloudController.additionalVolumes }}
volumes:
- name: kubeconfig
projected:
defaultMode: 420
sources:
- secret:
items:
- key: kubeconfig
path: kubeconfig
name: {{ .Values.genericTokenKubeconfigSecretName }}
optional: false
- secret:
items:
- key: token
path: token
name: shoot-access-cloud-controller-manager
optional: false
{{- if .Values.yawolCloudController.additionalVolumes }}
{{ toYaml .Values.yawolCloudController.additionalVolumes | indent 6 }}
{{- end }}
{{- end }}
25 changes: 4 additions & 21 deletions charts/yawol-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,8 @@ yawolCloudController:
clusterRoleEnabled: true
additionalArguments:
- -target-kubeconfig=/var/run/secrets/gardener.cloud/shoot/generic-kubeconfig/kubeconfig
additionalVolumes:
- name: kubeconfig
projected:
defaultMode: 420
sources:
- secret:
items:
- key: kubeconfig
path: kubeconfig
name: generic-token-kubeconfig
optional: false
- secret:
items:
- key: token
path: token
name: shoot-access-cloud-controller-manager
optional: false
additionalVolumeMounts:
- mountPath: /var/run/secrets/gardener.cloud/shoot/generic-kubeconfig
name: kubeconfig
readOnly: true
additionalVolumes: []
additionalVolumeMounts: []
image:
repository: ghcr.io/stackitcloud/yawol/yawol-cloud-controller
tag: latest
Expand Down Expand Up @@ -117,3 +98,5 @@ yawolAvailabilityZone: ""

# URL/IP of the Kubernetes API server that contains the LoadBalancer resources
yawolAPIHost:

genericTokenKubeconfigSecretName: generic-token-kubeconfig