-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aab89e0
commit 2d69e43
Showing
25 changed files
with
519 additions
and
333 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
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,13 @@ | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: portworx-operator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: portworx-operator | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: portworx-operator | ||
apiGroup: rbac.authorization.k8s.io |
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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: portworx-operator | ||
rules: | ||
- apiGroups: ["*"] | ||
resources: ["*"] | ||
verbs: ["*"] | ||
{{- if semverCompare "<1.25" (.Capabilities.KubeVersion.Version) }} | ||
- apiGroups: ["policy"] | ||
resources: ["podsecuritypolicies"] | ||
resourceNames: ["px-operator"] | ||
verbs: ["use"] | ||
{{- end }} |
14 changes: 14 additions & 0 deletions
14
charts/portworx/templates/clustertoken-serviceaccount.yaml
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,14 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Values.clusterToken.serviceAccountName }} | ||
annotations: | ||
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded,hook-failed | ||
helm.sh/hook: post-install | ||
labels: | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service | quote }} | ||
app.kubernetes.io/instance: {{ .Release.Name | quote }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
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,48 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: portworx-operator | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 1 | ||
type: RollingUpdate | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
name: portworx-operator | ||
template: | ||
metadata: | ||
labels: | ||
name: portworx-operator | ||
spec: | ||
containers: | ||
- name: portworx-operator | ||
imagePullPolicy: Always | ||
image: "{{ .Values.operator.image.repository }}:{{ default .Chart.AppVersion .Values.image.operator.tag }}" | ||
command: | ||
- /operator | ||
- --verbose | ||
- --driver=portworx | ||
- --leader-elect=true | ||
env: | ||
- name: OPERATOR_NAME | ||
value: portworx-operator | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
affinity: | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: "name" | ||
operator: In | ||
values: | ||
- portworx-operator | ||
topologyKey: "kubernetes.io/hostname" | ||
serviceAccountName: portworx-operator |
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,15 @@ | ||
--- | ||
kind: ClusterRole | ||
apiVersion: {{ template "rbac.apiVersion" . }} | ||
metadata: | ||
annotations: | ||
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded | ||
helm.sh/hook: post-install,pre-upgrade,pre-delete | ||
name: {{ template "px.hookClusterRole" . }} | ||
rules: | ||
# for daemonset to operator migration, we need hooks for all resources deployed by daemonset, due to resources are | ||
# different in different helm charts (GCP, IKS, Rancher and portworx), we use wild card here. After daemonset | ||
# migration is finished for all customers we shall change this back to limited access. | ||
- apiGroups: ["*"] | ||
resources: ["*"] | ||
verbs: ["*"] |
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,17 @@ | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: {{ template "rbac.apiVersion" . }} | ||
metadata: | ||
annotations: | ||
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded | ||
helm.sh/hook: "post-install,pre-upgrade,pre-delete" | ||
name: {{ template "px.hookClusterRoleBinding" . }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ template "px.hookServiceAccount" . }} | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: {{ template "px.hookClusterRole" . }} | ||
apiGroup: rbac.authorization.k8s.io | ||
{{- end }} |
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
Oops, something went wrong.