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

Feat/add labels and annotations #371

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
28 changes: 28 additions & 0 deletions deploy/charts/istio-csr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,34 @@ Example: maistra.io/member-of=istio-system
Allows you to disable the default Kubernetes client rate limiter if istio-csr is exceeding the default QPS (5) and Burst (10) limits. For example in large clusters with many Istio workloads, restarting the Pods may cause istio-csr to send bursts Kubernetes API requests that exceed the limits of the default Kubernetes client rate limiter and istio-csr will become slow to issue certificates for your workloads. Only disable client rate limiting if the Kubernetes API server supports
[API Priority and Fairness](https://kubernetes.io/docs/concepts/cluster-administration/flow-control/),
to avoid overloading the server.
#### **deploymentLabels** ~ `object`
> Default value:
> ```yaml
> {}
> ```

Optional extra labels for deployment.
#### **deploymentAnnotations** ~ `object`
> Default value:
> ```yaml
> {}
> ```

Optional extra annotations for deployment.
#### **podLabels** ~ `object`
> Default value:
> ```yaml
> {}
> ```

Optional extra labels for pod.
#### **podAnnotations** ~ `object`
> Default value:
> ```yaml
> {}
> ```

Optional extra annotations for pod.
#### **volumes** ~ `array`
> Default value:
> ```yaml
Expand Down
14 changes: 14 additions & 0 deletions deploy/charts/istio-csr/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "cert-manager-istio-csr.labels" . | nindent 4 }}
{{- with .Values.deploymentLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -15,6 +22,13 @@ spec:
labels:
app: {{ include "cert-manager-istio-csr.name" . }}
{{- include "cert-manager-istio-csr.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
32 changes: 32 additions & 0 deletions deploy/charts/istio-csr/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@
},
"volumes": {
"$ref": "#/$defs/helm-values.volumes"
},
"deploymentAnnotations": {
"$ref": "#/$defs/helm-values.deploymentAnnotations"
},
"deploymentLabels": {
"$ref": "#/$defs/helm-values.deploymentLabels"
},
"podAnnotations": {
"$ref": "#/$defs/helm-values.podAnnotations"
},
"podLabels": {
"$ref": "#/$defs/helm-values.podLabels"
}
},
"type": "object"
Expand Down Expand Up @@ -687,6 +699,26 @@
"description": "Optional extra volumes. Useful for mounting custom root CAs\n\nFor example:\nvolumes:\n- name: root-ca\n secret:\n secretName: root-cert",
"items": {},
"type": "array"
},
"helm-values.deploymentLabels": {
"default": {},
"description": "Optional extra labels for deployment.",
"type": "object"
},
"helm-values.deploymentAnnotations": {
"default": {},
"description": "Optional extra annotations for deployment.",
"type": "object"
},
"helm-values.podLabels": {
"default": {},
"description": "Optional extra labels for pod.",
"type": "object"
},
"helm-values.podAnnotations": {
"default": {},
"description": "Optional extra annotations for pod.",
"type": "object"
}
},
"$ref": "#/$defs/helm-values",
Expand Down
12 changes: 12 additions & 0 deletions deploy/charts/istio-csr/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,18 @@ app:
# to avoid overloading the server.
disableKubernetesClientRateLimiter: false

# Optional extra labels for deployment.
deploymentLabels: {}

# Optional extra annotations for deployment.
deploymentAnnotations: {}

# Optional extra labels for pod.
podLabels: {}

# Optional extra annotations for pod.
podAnnotations: {}

# Optional extra volumes. Useful for mounting custom root CAs
#
# For example:
Expand Down