forked from kedacore/charts
-
Notifications
You must be signed in to change notification settings - Fork 2
keda: multitenant setup #423
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ca627e7
ability to disable metrics server deployment
zroubalik 5672fd6
multitenant keda
wozniakjan e27c7f8
multitenant keda with ConfigMap-based self-registration
wozniakjan 201e354
multitenant keda rbac refinement
wozniakjan 6150826
multitenant keda: grant agent access to TLS secret
wozniakjan 4574b6d
keda: make tenant mode work when sharing a namespace
wozniakjan 2efd1f5
keda: tenant registration honors clusterDomain; values/whitespace tidy
wozniakjan d962492
keda: add kedify.multitenant to values.schema.json
wozniakjan 67c2190
keda: grant adapter events.k8s.io RBAC for the new events API
1ee217b
keda: address Copilot review on MT chart
543202d
keda: quote namespace in tenant registration ConfigMap
60ecaad
keda: make mode=tenant disable shared singletons automatically
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| {{- if and .Values.kedify.multitenant .Values.kedify.multitenant.mode }} | ||
| # Grant kedify-agent read access to this tenant's TLS certificate secret. | ||
| # The agent needs this to sync tenant certificates into the shared multitenancy config. | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
| {{- with .Values.additionalAnnotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| labels: | ||
| app.kubernetes.io/name: {{ .Release.Name }}-kedify-agent-secret-reader | ||
| {{- include "keda.labels" . | indent 4 }} | ||
| name: {{ .Release.Name }}-kedify-agent-secret-reader | ||
| namespace: {{ .Release.Namespace }} | ||
| rules: | ||
| - apiGroups: [""] | ||
| resources: ["secrets"] | ||
| verbs: ["get"] | ||
| resourceNames: | ||
| - {{ .Values.certificates.secretName | quote }} | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| {{- with .Values.additionalAnnotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| labels: | ||
| app.kubernetes.io/name: {{ .Release.Name }}-kedify-agent-secret-reader | ||
| {{- include "keda.labels" . | indent 4 }} | ||
| name: {{ .Release.Name }}-kedify-agent-secret-reader | ||
| namespace: {{ .Release.Namespace }} | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: Role | ||
| name: {{ .Release.Name }}-kedify-agent-secret-reader | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ .Values.kedify.multitenant.agentServiceAccount }} | ||
| namespace: {{ .Values.kedify.multitenant.agentNamespace }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| {{- if and .Values.kedify.multitenant .Values.kedify.multitenant.mode }} | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: {{ .Release.Name }}-kedify-tenant-registration | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| kedify.io/tenant-registration: "true" | ||
| {{- include "keda.labels" . | nindent 4 }} | ||
| {{- with .Values.additionalAnnotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| data: | ||
| name: {{ printf "%s/%s" .Release.Namespace .Release.Name | quote }} | ||
| namespace: {{ .Release.Namespace }} | ||
| watchNamespace: {{ .Values.watchNamespace | default .Release.Namespace | quote }} | ||
| address: {{ .Values.kedify.multitenant.address | default (printf "%s.%s.svc.%s:9666" .Values.operator.name .Release.Namespace .Values.clusterDomain) | quote }} | ||
| {{- if .Values.kedify.multitenant.authority }} | ||
| authority: {{ .Values.kedify.multitenant.authority | quote }} | ||
| {{- end }} | ||
| tlsSecretRef: {{ .Values.certificates.secretName | quote }} | ||
| isDefaultTenant: {{ eq .Values.kedify.multitenant.mode "default" | quote }} | ||
| operatorDeploymentName: {{ .Values.operator.name | quote }} | ||
| {{- end }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
keda/templates/metrics-server/kedify-multitenancy-config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| {{- if eq .Values.kedify.multitenant.mode "default" }} | ||
| # secret for kedify multitenancy configuration, dynamically populated by kedify-agent at runtime | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: {{ .Values.kedify.multitenant.configSecretName }} | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| {{- include "keda.labels" . | nindent 4 }} | ||
| {{- with .Values.additionalAnnotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| type: Opaque | ||
|
kedifybot marked this conversation as resolved.
|
||
| {{- end }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| {{- if and .Values.metricsServer.enabled .Values.rbac.create (eq .Values.kedify.multitenant.mode "default") }} | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
| {{- with .Values.additionalAnnotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| labels: | ||
| app.kubernetes.io/name: {{ .Values.operator.name }}-metrics-server-kedify | ||
| {{- include "keda.labels" . | indent 4 }} | ||
| name: {{ .Values.operator.name }}-metrics-server-kedify | ||
| namespace: {{ .Release.Namespace }} | ||
| rules: | ||
| - apiGroups: | ||
| - events.k8s.io | ||
| resources: | ||
| - events | ||
| verbs: | ||
| - create | ||
| - patch | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| {{- with .Values.additionalAnnotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| labels: | ||
| app.kubernetes.io/name: {{ .Values.operator.name }}-metrics-server-kedify | ||
| {{- include "keda.labels" . | indent 4 }} | ||
| name: {{ .Values.operator.name }}-metrics-server-kedify | ||
| namespace: {{ .Release.Namespace }} | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: Role | ||
| name: {{ .Values.operator.name }}-metrics-server-kedify | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ (.Values.serviceAccount.metricServer).name | default .Values.serviceAccount.name }} | ||
| namespace: {{ .Release.Namespace }} | ||
| {{- end -}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.