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

Support crd-specific annotations #584

Merged
merged 4 commits into from
Jan 18, 2024
Merged
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
1 change: 1 addition & 0 deletions keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ their default values.
| `certificates.secretName` | string | `"kedaorg-certs"` | Secret name to be mounted with KEDA TLS certificates |
| `clusterDomain` | string | `"cluster.local"` | Kubernetes cluster domain |
| `clusterName` | string | `"kubernetes-default"` | Kubernetes cluster name. Used in features such as emitting CloudEvents |
| `crds.additionalAnnotations` | object | `{}` | Custom annotations specifically for CRDs |
| `crds.install` | bool | `true` | Defines whether the KEDA CRDs have to be installed or not. |
| `env` | list | `[]` | Additional environment variables that will be passed onto all KEDA components |
| `extraObjects` | list | `[]` | Array of extra K8s manifests to deploy |
Expand Down
4 changes: 2 additions & 2 deletions keda/templates/crds/crd-clustertriggerauthentications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
{{- if .Values.additionalAnnotations }}
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }}
{{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
Expand Down
4 changes: 2 additions & 2 deletions keda/templates/crds/crd-scaledjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
{{- if .Values.additionalAnnotations }}
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }}
{{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
Expand Down
4 changes: 2 additions & 2 deletions keda/templates/crds/crd-scaledobjects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
{{- if .Values.additionalAnnotations }}
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }}
{{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
Expand Down
4 changes: 2 additions & 2 deletions keda/templates/crds/crd-triggerauthentications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
{{- if .Values.additionalAnnotations }}
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }}
{{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
Expand Down
5 changes: 5 additions & 0 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ crds:
# -- Defines whether the KEDA CRDs have to be installed or not.
install: true

# -- Custom annotations specifically for CRDs
additionalAnnotations:
{}
# foo: bar

# -- Defines Kubernetes namespaces to watch to scale their workloads. Default watches all namespaces
watchNamespace: ""

Expand Down
Loading