forked from CrunchyData/postgres-operator-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add upgrade controller to Helm install chart
Issue: [sc-14201]
- Loading branch information
Showing
12 changed files
with
1,042 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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,3 @@ | ||
# https://github.com/github/linguist/issues/4905 | ||
# https://github.com/github/linguist/issues/5092#issuecomment-730262298 | ||
/templates/*.tpl linguist-language=handlebars |
This file contains 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 @@ | ||
.git* |
This file contains 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
850 changes: 850 additions & 0 deletions
850
helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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,40 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Chart.Name }}-upgrade | ||
labels: | ||
{{- include "install.labels" . | nindent 4 }} | ||
{{- include "install.upgradeLabels" . | nindent 4 }} | ||
spec: | ||
replicas: 1 | ||
strategy: { type: Recreate } | ||
selector: | ||
matchLabels: | ||
{{- include "install.upgradeLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "install.upgradeLabels" . | nindent 8 }} | ||
spec: | ||
{{- include "install.imagePullSecrets" . | indent 6 }} | ||
serviceAccountName: {{ include "install.serviceAccountName" . }}-upgrade | ||
containers: | ||
- name: operator | ||
image: {{ required ".Values.controllerImages.upgrade is required" .Values.controllerImages.upgrade | quote }} | ||
env: | ||
- name: CRUNCHY_DEBUG | ||
value: {{ .Values.debug | ne false | quote }} | ||
{{- if .Values.singleNamespace }} | ||
- name: PGO_TARGET_NAMESPACE | ||
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } } | ||
{{- end }} | ||
{{- if .Values.workers }} | ||
- name: PGO_WORKERS | ||
value: {{ .Values.workers | quote }} | ||
{{- end }} | ||
{{- include "install.relatedImages" . | indent 8 }} | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true |
This file contains 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 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,71 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: {{ include "install.roleKind" . }} | ||
metadata: | ||
name: {{ include "install.roleName" . }}-upgrade | ||
labels: | ||
{{- include "install.labels" . | nindent 4 }} | ||
{{- include "install.upgradeLabels" . | nindent 4 }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- endpoints | ||
verbs: | ||
- delete | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- statefulsets | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- batch | ||
resources: | ||
- jobs | ||
verbs: | ||
- create | ||
- delete | ||
- list | ||
- patch | ||
- watch | ||
- apiGroups: | ||
- postgres-operator.crunchydata.com | ||
resources: | ||
- pgupgrades | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- postgres-operator.crunchydata.com | ||
resources: | ||
- pgupgrades/finalizers | ||
verbs: | ||
- patch | ||
- update | ||
- apiGroups: | ||
- postgres-operator.crunchydata.com | ||
resources: | ||
- pgupgrades/status | ||
verbs: | ||
- get | ||
- patch | ||
- apiGroups: | ||
- postgres-operator.crunchydata.com | ||
resources: | ||
- postgresclusters | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- postgres-operator.crunchydata.com | ||
resources: | ||
- postgresclusters/status | ||
verbs: | ||
- patch |
This file contains 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 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 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 |
---|---|---|
@@ -1,6 +1,16 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "install.serviceAccountName" . }} | ||
labels: | ||
{{- include "install.labels" . | nindent 4 }} | ||
{{- include "install.clusterLabels" . | nindent 4 }} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "install.serviceAccountName" . }}-upgrade | ||
labels: | ||
{{- include "install.labels" . | nindent 4 }} | ||
{{- include "install.upgradeLabels" . | nindent 4 }} |
This file contains 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