Skip to content

Commit 593b69e

Browse files
Portworx: operator helm chart
1 parent 65797d9 commit 593b69e

26 files changed

+503
-553
lines changed

charts/portworx/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: portworx
22
version: 2.13.0
33
description: A Helm chart for installing Portworx on Kubernetes.
44
kubeVersion: ">=1.10.0"
5-
appVersion: "2.12.2"
5+
appVersion: 2.13.0
66
apiVersion: v1
77
keywords:
88
- Storage
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
kind: ClusterRoleBinding
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
metadata:
5+
name: portworx-operator
6+
subjects:
7+
- kind: ServiceAccount
8+
name: portworx-operator
9+
namespace: {{ .Release.Namespace }}
10+
roleRef:
11+
kind: ClusterRole
12+
name: portworx-operator
13+
apiGroup: rbac.authorization.k8s.io

charts/portworx/files/portworx-cluster-dashboard.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
"#d44a3a"
334334
],
335335
"datasource": "prometheus",
336-
"format": "none",
336+
"format": "null",
337337
"gauge": {
338338
"maxValue": 100,
339339
"minValue": 0,
@@ -508,7 +508,7 @@
508508
"#d44a3a"
509509
],
510510
"datasource": "prometheus",
511-
"format": "none",
511+
"format": "null",
512512
"gauge": {
513513
"maxValue": 100,
514514
"minValue": 0,
@@ -600,7 +600,7 @@
600600
"#d44a3a"
601601
],
602602
"datasource": "prometheus",
603-
"format": "none",
603+
"format": "null",
604604
"gauge": {
605605
"maxValue": 100,
606606
"minValue": 0,
@@ -972,4 +972,4 @@
972972
"title": "Portworx Cluster Dashboard",
973973
"uid": "xLgt8oTik",
974974
"version": 6
975-
}
975+
}

charts/portworx/files/portworx-etcd-dashboard.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"datasource": "prometheus",
6868
"editable": true,
6969
"error": false,
70-
"format": "none",
70+
"format": "null",
7171
"gauge": {
7272
"maxValue": 100,
7373
"minValue": 0,

charts/portworx/files/portworx-node-dashboard.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"#d44a3a"
7979
],
8080
"datasource": "prometheus",
81-
"format": "none",
81+
"format": "null",
8282
"gauge": {
8383
"maxValue": 100,
8484
"minValue": 0,
@@ -168,7 +168,7 @@
168168
"#d44a3a"
169169
],
170170
"datasource": "prometheus",
171-
"format": "none",
171+
"format": "null",
172172
"gauge": {
173173
"maxValue": 100,
174174
"minValue": 0,

charts/portworx/files/portworx-volume-dashboard.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@
434434
"rgba(50, 172, 45, 0.97)"
435435
],
436436
"datasource": "prometheus",
437-
"format": "none",
437+
"format": "null",
438438
"gauge": {
439439
"maxValue": 3,
440440
"minValue": 0,
@@ -561,7 +561,7 @@
561561
"rgba(50, 172, 45, 0.97)"
562562
],
563563
"datasource": "prometheus",
564-
"format": "none",
564+
"format": "null",
565565
"gauge": {
566566
"maxValue": 3,
567567
"minValue": 0,
@@ -1055,7 +1055,7 @@
10551055
"rgba(50, 172, 45, 0.97)"
10561056
],
10571057
"datasource": "prometheus",
1058-
"format": "none",
1058+
"format": "null",
10591059
"gauge": {
10601060
"maxValue": 3,
10611061
"minValue": 0,
@@ -1477,7 +1477,7 @@
14771477
"yaxes": [
14781478
{
14791479
"decimals": 0,
1480-
"format": "none",
1480+
"format": "null",
14811481
"label": null,
14821482
"logBase": 1,
14831483
"max": null,
@@ -1950,7 +1950,7 @@
19501950
},
19511951
"yaxes": [
19521952
{
1953-
"format": "none",
1953+
"format": "null",
19541954
"label": "",
19551955
"logBase": 1,
19561956
"max": null,

charts/portworx/templates/_helpers.tpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,19 +231,19 @@ Generate a random token for storage provisioning
231231

232232
{{- define "px.deprecatedKvdbArgs" }}
233233
{{- $result := "" }}
234-
{{- if ne .Values.etcd.credentials "none:none" }}
234+
{{- if ne .Values.etcd.credentials "null:null" }}
235235
{{- $result = printf "%s -userpwd %s" $result .Values.etcd.credentials }}
236236
{{- end }}
237-
{{- if ne .Values.etcd.ca "none" }}
237+
{{- if ne .Values.etcd.ca "null" }}
238238
{{- $result = printf "%s -ca %s" $result .Values.etcd.ca }}
239239
{{- end }}
240-
{{- if ne .Values.etcd.cert "none" }}
240+
{{- if ne .Values.etcd.cert "null" }}
241241
{{- $result = printf "%s -cert %s" $result .Values.etcd.cert }}
242242
{{- end }}
243-
{{- if ne .Values.etcd.key "none" }}
243+
{{- if ne .Values.etcd.key "null" }}
244244
{{- $result = printf "%s -key %s" $result .Values.etcd.key }}
245245
{{- end }}
246-
{{- if ne .Values.consul.token "none" }}
246+
{{- if ne .Values.consul.token "null" }}
247247
{{- $result = printf "%s -acltoken %s" $result .Values.consul.token }}
248248
{{- end }}
249249
{{- trim $result }}
@@ -254,7 +254,7 @@ Generate a random token for storage provisioning
254254
{{- if (include "px.deprecatedKvdbArgs" .) }}
255255
{{- $result = printf "%s %s" $result (include "px.deprecatedKvdbArgs" .) }}
256256
{{- end }}
257-
{{- if ne .Values.miscArgs "none" }}
257+
{{- if ne .Values.miscArgs "null" }}
258258
{{- $result = printf "%s %s" $result .Values.miscArgs }}
259259
{{- end }}
260260
{{- trim $result }}
@@ -265,7 +265,7 @@ Generate a random token for storage provisioning
265265
{{- if (default false .Values.isTargetOSCoreOS) }}
266266
{{- $result = true }}
267267
{{- end }}
268-
{{- if ne (default "none" .Values.etcd.certPath) "none" }}
268+
{{- if ne (default "null" .Values.etcd.certPath) "null" }}
269269
{{- $result = true }}
270270
{{- end }}
271271
{{- if .Values.volumes }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
kind: ClusterRole
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
metadata:
5+
name: portworx-operator
6+
rules:
7+
- apiGroups: ["*"]
8+
resources: ["*"]
9+
verbs: ["*"]
10+
{{- if semverCompare "<1.25" (.Capabilities.KubeVersion.Version) }}
11+
- apiGroups: ["policy"]
12+
resources: ["podsecuritypolicies"]
13+
resourceNames: ["px-operator"]
14+
verbs: ["use"]
15+
{{- end }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ .Values.clusterToken.serviceAccountName }}
6+
annotations:
7+
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded,hook-failed
8+
helm.sh/hook: post-install
9+
labels:
10+
heritage: {{ .Release.Service }}
11+
release: {{ .Release.Name }}
12+
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
13+
app.kubernetes.io/instance: {{ .Release.Name | quote }}
14+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: portworx-operator
6+
namespace: {{ .Release.Namespace }}
7+
spec:
8+
strategy:
9+
rollingUpdate:
10+
maxSurge: 1
11+
maxUnavailable: 1
12+
type: RollingUpdate
13+
replicas: 1
14+
selector:
15+
matchLabels:
16+
name: portworx-operator
17+
template:
18+
metadata:
19+
labels:
20+
name: portworx-operator
21+
spec:
22+
containers:
23+
- name: portworx-operator
24+
imagePullPolicy: Always
25+
image: "{{ .Values.operator.image.repository }}:{{ default .Chart.AppVersion .Values.image.operator.tag }}"
26+
command:
27+
- /operator
28+
- --verbose
29+
- --driver=portworx
30+
- --leader-elect=true
31+
env:
32+
- name: OPERATOR_NAME
33+
value: portworx-operator
34+
- name: POD_NAME
35+
valueFrom:
36+
fieldRef:
37+
fieldPath: metadata.name
38+
affinity:
39+
podAntiAffinity:
40+
requiredDuringSchedulingIgnoredDuringExecution:
41+
- labelSelector:
42+
matchExpressions:
43+
- key: "name"
44+
operator: In
45+
values:
46+
- portworx-operator
47+
topologyKey: "kubernetes.io/hostname"
48+
serviceAccountName: portworx-operator

0 commit comments

Comments
 (0)