-
Notifications
You must be signed in to change notification settings - Fork 710
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
Pass json config for additional clusters through to kubeops. #1767
Conversation
With this change, the config map can be easily edited, as it looks like: ``` apiVersion: v1 data: additional-clusters.conf: |- [ { "apiServiceURL": "https://second-cluster:6443", "certificateAuthorityData": "LS0tLS1CRUdJ...", "name": "second-cluster" } ] kind: ConfigMap metadata: annotations: ... ```
data: | ||
additional-clusters.conf: |- | ||
{{ .Values.featureFlags.additionalClusters | toPrettyJson | indent 4 }} | ||
{{- end -}} |
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.
you forgot the blank line at the end
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.
Updated editor (recently switched back to give vscode another try, so was missing some defaults).
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
data: | ||
additional-clusters.conf: |- |
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.
I think you will need the same info for the dashboard, maybe it's better to set this on its config and mount it for kubeops?
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.
The dashboard won't need the same config, I'll just be including the additional cluster names there (there's no need for ca data or actual api server urls leaving the cluster to be sent to the dashboard, I don't think?)
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.
well, yes, but to make sure that we only have one source of truth, I would use the same config (even if there are fields that are not needed there).
@@ -48,6 +48,12 @@ spec: | |||
args: | |||
- --user-agent-comment=kubeapps/{{ .Chart.AppVersion }} | |||
- --assetsvc-url=http://{{ template "kubeapps.assetsvc.fullname" . }}:{{ .Values.assetsvc.service.port }} | |||
{{- if .Values.featureFlags.additionalClusters }} | |||
- --additional-clusters-config-path=/config/additional-clusters.conf | |||
volumeMounts: |
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.
I would split the volumeMounts
in a different if
in case we need to mount something else in the future.
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.
Yeah, I wondered about that, but thought we can do that when needed. Anyway, updated.
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.
Thanks
data: | ||
additional-clusters.conf: |- | ||
{{ .Values.featureFlags.additionalClusters | toPrettyJson | indent 4 }} | ||
{{- end -}} |
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.
Updated editor (recently switched back to give vscode another try, so was missing some defaults).
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
data: | ||
additional-clusters.conf: |- |
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.
The dashboard won't need the same config, I'll just be including the additional cluster names there (there's no need for ca data or actual api server urls leaving the cluster to be sent to the dashboard, I don't think?)
@@ -48,6 +48,12 @@ spec: | |||
args: | |||
- --user-agent-comment=kubeapps/{{ .Chart.AppVersion }} | |||
- --assetsvc-url=http://{{ template "kubeapps.assetsvc.fullname" . }}:{{ .Values.assetsvc.service.port }} | |||
{{- if .Values.featureFlags.additionalClusters }} | |||
- --additional-clusters-config-path=/config/additional-clusters.conf | |||
volumeMounts: |
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.
Yeah, I wondered about that, but thought we can do that when needed. Anyway, updated.
With this change, the config map can be easily edited, as it looks like:
Ref #1761