Skip to content

Commit

Permalink
Merge pull request #64 from ondat/formatting-tweaks
Browse files Browse the repository at this point in the history
Formatting tweaks
  • Loading branch information
DavidMarchant authored Dec 14, 2022
2 parents a00a111 + f2b183e commit 36f6149
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sed -i templates/*.yml -e '0,/labels:/{/labels:/d;}' -e '0,/metadata:/{s/metadat
# Set the proxy image
sed -i templates/Deployment-storageos-etcd-proxy.yml -e 's/image: storageos\/etcd-cluster-operator-proxy.*$/image: {{ .Values.images.etcdClusterOperatorProxy.registry }}\/{{ .Values.images.etcdClusterOperatorProxy.image }}:{{ .Values.images.etcdClusterOperatorProxy.tag }}/g'
# Set the operator image
sed -i templates/Deployment-storageos-etcd-controller-manager.yml -e 's/image: storageos\/etcd-cluster-operator-controller.*$/image: {{ .Values.images.etcdClusterOperatorController.registry}}\/{{ .Values.images.etcdClusterOperatorController.image}}:{{ .Values.images.etcdClusterOperatorController.tag }}/g'
sed -i templates/Deployment-storageos-etcd-controller-manager.yml -e 's/image: storageos\/etcd-cluster-operator-controller.*$/image: {{ .Values.images.etcdClusterOperatorController.registry }}\/{{ .Values.images.etcdClusterOperatorController.image }}:{{ .Values.images.etcdClusterOperatorController.tag }}/g'
```

Then create the template for the namespace:
Expand Down
26 changes: 13 additions & 13 deletions charts/component-charts/ondat-operator/templates/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: storageos-cleanup
name: storageos-cleanup-1
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-delete
Expand All @@ -23,7 +23,7 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: storageos:cleanup
name: storageos:cleanup-1
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": "hook-succeeded, hook-failed, before-hook-creation"
Expand Down Expand Up @@ -96,17 +96,17 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: storageos:cleanup
name: storageos:cleanup-1
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": "hook-succeeded, hook-failed, before-hook-creation"
"helm.sh/hook-weight": "2"
subjects:
- name: storageos-cleanup
- name: storageos-cleanup-1
kind: ServiceAccount
namespace: {{ .Release.Namespace }}
roleRef:
name: storageos:cleanup
name: storageos:cleanup-1
kind: ClusterRole
apiGroup: rbac.authorization.k8s.io

Expand All @@ -127,7 +127,7 @@ metadata:
spec:
template:
spec:
serviceAccountName: storageos-cleanup
serviceAccountName: storageos-cleanup-1
containers:
- name: "storageos-storageoscluster-cleanup"
image: "{{ $.Values.images.kubectl.registry }}/{{ $.Values.images.kubectl.image }}:{{ $.Values.images.kubectl.tag }}"
Expand Down Expand Up @@ -156,7 +156,7 @@ metadata:
spec:
template:
spec:
serviceAccountName: storageos-cleanup
serviceAccountName: storageos-cleanup-1
containers:
- name: "storageos-cleanup-wait"
image: "{{ $.Values.images.kubectl.registry }}/{{ $.Values.images.kubectl.image }}:{{ $.Values.images.kubectl.tag }}"
Expand All @@ -181,7 +181,7 @@ spec:
apiVersion: v1
kind: ServiceAccount
metadata:
name: storageos-cleanup
name: storageos-cleanup-2
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": post-delete
Expand All @@ -193,7 +193,7 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: storageos:cleanup
name: storageos:cleanup-2
annotations:
"helm.sh/hook": post-delete
"helm.sh/hook-delete-policy": "hook-succeeded, hook-failed, before-hook-creation"
Expand Down Expand Up @@ -266,17 +266,17 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: storageos:cleanup
name: storageos:cleanup-2
annotations:
"helm.sh/hook": post-delete
"helm.sh/hook-delete-policy": "hook-succeeded, hook-failed, before-hook-creation"
"helm.sh/hook-weight": "2"
subjects:
- name: storageos-cleanup
- name: storageos-cleanup-2
kind: ServiceAccount
namespace: {{ .Release.Namespace }}
roleRef:
name: storageos:cleanup
name: storageos:cleanup-2
kind: ClusterRole
apiGroup: rbac.authorization.k8s.io

Expand All @@ -297,7 +297,7 @@ metadata:
spec:
template:
spec:
serviceAccountName: storageos-cleanup
serviceAccountName: storageos-cleanup-2
containers:
- name: "storageos-operator-data-cleanup"
image: "{{ $.Values.images.kubectl.registry }}/{{ $.Values.images.kubectl.image }}:{{ $.Values.images.kubectl.tag }}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-azure-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ yq e -i ".global.azure.billingIdentifier=\"DONOTMODIFY\"" ./charts/umbrella-char

# Update the templates to use the new values
sed -i charts/*/*/templates/* -e 's/.Values.images./.Values.global.azure.images./g'
# This may not be needed
sed -i charts/*/*/templates/* -e 's/\.tag/\.digest/g'
sed -i charts/*/*/templates/* -e 's/}}:{{/}}@{{/g'
# Revert the change for the etcd version as that's weird at this moment in time
sed -i charts/*/*/templates/* -e 's/{{ trimPrefix "v" .Values.global.azure.images.etcd.digest }}/{{ trimPrefix "v" .Values.global.azure.images.etcd.tag }}/g'

Expand Down

0 comments on commit 36f6149

Please sign in to comment.