From 5aa82e8ffb619f0eb9070031369f827a3f9b4521 Mon Sep 17 00:00:00 2001 From: Jonas Zipprick Date: Tue, 13 Aug 2024 10:27:11 +0200 Subject: [PATCH 1/3] Add priorityClassName values to operator and connect --- charts/connect/README.md | 2 ++ charts/connect/templates/connect-deployment.yaml | 5 ++++- charts/connect/templates/operator-deployment.yaml | 5 ++++- charts/connect/values.yaml | 6 ++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/charts/connect/README.md b/charts/connect/README.md index a4976f2..7fab1c1 100644 --- a/charts/connect/README.md +++ b/charts/connect/README.md @@ -83,6 +83,7 @@ helm install --set connect.applicationName=connect connect ./connect | connect.ingress.pathType | string | `"Prefix"` | Ingress PathType see [docs](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types) | | connect.ingress.tls | list | `[]` | Ingress TLS see [docs](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) | | connect.nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) stanza for the Connect pod | +| connect.priorityClassName | string | `""` | priorityClassName to apply to the Connect API deployment resource. | | connect.probes.readiness | boolean | `true` | Denotes whether the 1Password Connect API readiness probe will operate and ensure the pod is ready before serving traffic | | connect.probes.liveness | boolean | `true` | Denotes whether the 1Password Connect API will be continually checked by Kubernetes for liveness and restarted if the pod becomes unresponsive | | connect.annotations | object | `{}` | Additional annotations to be added to the Connect API deployment resource. | @@ -112,6 +113,7 @@ helm install --set connect.applicationName=connect connect ./connect | operator.podAnnotations | object | `{}` | Additional annotations to be added to the Operator pods. | | operator.podLabels | object | `{}` | Additional labels to be added to the Operator pods. | | operator.pollingInterval | integer | `600` | How often the 1Password Operator will poll for secrets updates. | +| operator.priorityClassName | string | `""` | priorityClassName to apply to the Operator pods. | | operator.clusterRole.create | boolean | `{{.Values.operator.create}}` | Denotes whether or not a cluster role will be created for each for the 1Password Operator | | operator.clusterRole.name | string | `"onepassword-connect-operator"` | The name of the 1Password Operator Cluster Role | | operator.clusterRoleBinding.create | boolean | `{{.Values.operator.create}}` | Denotes whether or not a Cluster role binding will be created for the 1Password Operator Service Account | diff --git a/charts/connect/templates/connect-deployment.yaml b/charts/connect/templates/connect-deployment.yaml index 22c57d5..584b6c2 100644 --- a/charts/connect/templates/connect-deployment.yaml +++ b/charts/connect/templates/connect-deployment.yaml @@ -37,6 +37,9 @@ spec: nodeSelector: {{ toYaml . | indent 8 }} {{- end }} + {{- if .Values.connect.priorityClassName }} + priorityClassName: {{ .Values.connect.priorityClassName }} + {{- end }} volumes: - name: {{ .Values.connect.dataVolume.name }} {{ .Values.connect.dataVolume.type }}: {{- toYaml .Values.connect.dataVolume.values | nindent 12 }} @@ -87,7 +90,7 @@ spec: {{- range .Values.connect.customEnvVars}} - name: {{ .name }} value: {{ .value }} - {{- end }} + {{- end }} {{- if .Values.connect.probes.readiness }} readinessProbe: httpGet: diff --git a/charts/connect/templates/operator-deployment.yaml b/charts/connect/templates/operator-deployment.yaml index 62c741e..b5b4f4d 100644 --- a/charts/connect/templates/operator-deployment.yaml +++ b/charts/connect/templates/operator-deployment.yaml @@ -36,6 +36,9 @@ spec: nodeSelector: {{ toYaml . | indent 8 }} {{- end }} + {{- if .Values.operator.priorityClassName }} + priorityClassName: {{ .Values.operator.priorityClassName }} + {{- end }} tolerations: {{ toYaml .Values.operator.tolerations | indent 8 }} serviceAccountName: {{ .Values.operator.serviceAccount.name }} @@ -75,7 +78,7 @@ spec: {{- range .Values.operator.customEnvVars}} - name: {{ .name }} value: {{ .value }} - {{- end }} + {{- end }} resources: {{- toYaml .Values.operator.resources | nindent 12 }} {{- end }} diff --git a/charts/connect/values.yaml b/charts/connect/values.yaml index 0f3b8a6..ca6ba39 100644 --- a/charts/connect/values.yaml +++ b/charts/connect/values.yaml @@ -107,6 +107,9 @@ connect: # by Kubernetes for liveness and restarted if the pod becomes unresponsive readiness: true + # priorityClassName to apply to the Connect API deployment resource. + priorityClassName: '' + # Additional annotations to be added to the Connect API deployment resource. annotations: {} @@ -234,6 +237,9 @@ operator: # Additional labels to be added to the Operator pods. podLabels: {} + # priorityClassName to apply to the Operator pods. + priorityClassName: '' + # List of tolerations to be added to the Operator pods. tolerations: [] From 5ece385cf80151812210314e981939c3855866aa Mon Sep 17 00:00:00 2001 From: Jonas Zipprick Date: Tue, 13 Aug 2024 10:28:35 +0200 Subject: [PATCH 2/3] Improve documentation. At link to relevant docs of priority-class Co-authored-by: Simon Barendse --- charts/connect/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/connect/README.md b/charts/connect/README.md index 7fab1c1..7255390 100644 --- a/charts/connect/README.md +++ b/charts/connect/README.md @@ -83,7 +83,7 @@ helm install --set connect.applicationName=connect connect ./connect | connect.ingress.pathType | string | `"Prefix"` | Ingress PathType see [docs](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types) | | connect.ingress.tls | list | `[]` | Ingress TLS see [docs](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) | | connect.nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) stanza for the Connect pod | -| connect.priorityClassName | string | `""` | priorityClassName to apply to the Connect API deployment resource. | +| connect.priorityClassName | string | `""` | [priorityClassName](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/) to apply to the Connect API deployment resource. | | connect.probes.readiness | boolean | `true` | Denotes whether the 1Password Connect API readiness probe will operate and ensure the pod is ready before serving traffic | | connect.probes.liveness | boolean | `true` | Denotes whether the 1Password Connect API will be continually checked by Kubernetes for liveness and restarted if the pod becomes unresponsive | | connect.annotations | object | `{}` | Additional annotations to be added to the Connect API deployment resource. | @@ -113,7 +113,7 @@ helm install --set connect.applicationName=connect connect ./connect | operator.podAnnotations | object | `{}` | Additional annotations to be added to the Operator pods. | | operator.podLabels | object | `{}` | Additional labels to be added to the Operator pods. | | operator.pollingInterval | integer | `600` | How often the 1Password Operator will poll for secrets updates. | -| operator.priorityClassName | string | `""` | priorityClassName to apply to the Operator pods. | +| operator.priorityClassName | string | `""` | [priorityClassName](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/) to apply to the Operator pods. | | operator.clusterRole.create | boolean | `{{.Values.operator.create}}` | Denotes whether or not a cluster role will be created for each for the 1Password Operator | | operator.clusterRole.name | string | `"onepassword-connect-operator"` | The name of the 1Password Operator Cluster Role | | operator.clusterRoleBinding.create | boolean | `{{.Values.operator.create}}` | Denotes whether or not a Cluster role binding will be created for the 1Password Operator Service Account | From 3f078f30f1cc5d466bcecfca543319301f4bf403 Mon Sep 17 00:00:00 2001 From: Jonas Zipprick Date: Tue, 13 Aug 2024 12:50:20 +0200 Subject: [PATCH 3/3] Add changelog entry --- charts/connect/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/connect/CHANGELOG.md b/charts/connect/CHANGELOG.md index 809ff6f..405e983 100644 --- a/charts/connect/CHANGELOG.md +++ b/charts/connect/CHANGELOG.md @@ -3,6 +3,7 @@ ## Features * A user-friendly description of a new feature. {issue-number} +* Add priorityClassName values to operator and connect. {#201} ## Fixes * A user-friendly description of a fix. {issue-number}