Skip to content

Commit d64f178

Browse files
authored
feat(openshift): Configure osm-label to work on OpenShift (#79)
Signed-off-by: Kalya Subramanian <[email protected]>
1 parent 61e10cb commit d64f178

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

charts/osm-arc/templates/osm-label.yml

+14
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ rules:
2424
- apiGroups: [""]
2525
resources: ["namespaces"]
2626
verbs: ["get", "patch"]
27+
{{- if eq .Values.Azure.Cluster.Distribution "openshift" }}
28+
- apiGroups:
29+
- security.openshift.io
30+
resourceNames:
31+
- anyuid
32+
resources:
33+
- securitycontextconstraints
34+
verbs:
35+
- use
36+
{{- end }}
2737
---
2838
kind: RoleBinding
2939
apiVersion: rbac.authorization.k8s.io/v1
@@ -88,14 +98,18 @@ metadata:
8898
"helm.sh/hook-weight": "35"
8999
"helm.sh/hook": pre-install
90100
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
101+
{{- if (ne .Values.Azure.Cluster.Distribution "openshift") }}
91102
seccomp.security.alpha.kubernetes.io/pod: runtime/default
103+
{{- end }}
92104
spec:
93105
template:
94106
metadata:
95107
labels:
96108
app: osm-label
109+
{{- if (ne .Values.Azure.Cluster.Distribution "openshift") }}
97110
annotations:
98111
seccomp.security.alpha.kubernetes.io/pod: runtime/default
112+
{{- end }}
99113
spec:
100114
serviceAccountName: osm-label-account
101115
automountServiceAccountToken: true

charts/osm-arc/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
# This is a YAML-formatted file.
33
# Declare variables to be passed into your templates.
44

5+
## Values populated by Azure Arc K8s RP during the installation of the extension
6+
Azure:
7+
Cluster:
8+
Distribution: <cluster_distribution>
9+
510
OpenServiceMesh:
611
ignoreNamespaces: "kube-system azure-arc arc-osm-system"
712

0 commit comments

Comments
 (0)