Skip to content

Commit

Permalink
add operator to teleport-cluster charts
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoandredinis committed May 11, 2022
1 parent 86d1c96 commit ce9b679
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 0 deletions.
76 changes: 76 additions & 0 deletions examples/chart/teleport-cluster/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,79 @@ rules:
- selfsubjectaccessreviews
verbs:
- create

{{ if .Values.operator }}
- apiGroups:
- "resources.teleport.dev"
resources:
- roles
- users
verbs:
- create
- delete
- get
- list
- patch
- update
- watch

- apiGroups:
- "auth.teleport.dev"
resources:
- identities
verbs:
- create
- delete
- get
- list
- patch
- update
- watch

- apiGroups:
- ""
resources:
- events
verbs:
- create

- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- get
- update

- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- get
- list
- update
- watch

- apiGroups:
- "apiextensions.k8s.io"
resources:
- customresourcedefinitions
verbs:
- create
- get
- list
- update
- watch

- apiGroups:
- "coordination.k8s.io"
resources:
- leases
verbs:
- create
- get
- update
{{ end }}
31 changes: 31 additions & 0 deletions examples/chart/teleport-cluster/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,37 @@ spec:
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 8 }}
{{- end }}
{{ if .Values.operator }}
- name: "operator"
image: "{{ .Values.operatorImage }}"
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- start-sidecar
- --config
- /etc/teleport/operator.yaml
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
{{- if .Values.resources }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
{{- end }}
volumeMounts:
- mountPath: /etc/teleport
name: "config"
readOnly: true
- mountPath: /var/lib/teleport
name: "data"
{{ end }}
volumes:
{{- if .Values.enterprise }}
- name: license
Expand Down
12 changes: 12 additions & 0 deletions examples/chart/teleport-cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
"clusterName",
"authenticationType",
"enterprise",
"operator",
"podSecurityPolicy",
"labels",
"chartMode",
"highAvailability",
"tls",
"image",
"enterpriseImage",
"operatorImage",
"log",
"affinity",
"annotations",
Expand Down Expand Up @@ -104,6 +106,11 @@
"type": "boolean",
"default": false
},
"operator": {
"$id": "#/properties/operator",
"type": "boolean",
"default": false
},
"podSecurityPolicy": {
"$id": "#/properties/podSecurityPolicy",
"type": "object",
Expand Down Expand Up @@ -362,6 +369,11 @@
"type": "string",
"default": "quay.io/gravitational/teleport-ent"
},
"operatorImage": {
"$id": "#/properties/operatorImage",
"type": "string",
"default": "quay.io/gravitational/teleport-operator"
},
"logLevel": {
"$id": "#/properties/logLevel",
"type": "string",
Expand Down
5 changes: 5 additions & 0 deletions examples/chart/teleport-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ acmeURI: ""
# kubectl -n ${TELEPORT_NAMESPACE?} create secret generic license --from-file=/path/to/downloaded/license.pem
enterprise: false

# Set operator to true to enable the Teleport Operator
operator: false

# If true, create & use Pod Security Policy resources
# https://kubernetes.io/docs/concepts/policy/pod-security-policy/
podSecurityPolicy:
Expand Down Expand Up @@ -191,6 +194,8 @@ tls:
image: quay.io/gravitational/teleport
# Enterprise version of the image
enterpriseImage: quay.io/gravitational/teleport-ent
# Teleport Kubernetes Operator image
operatorImage: quay.io/gravitational/teleport-operator
# Teleport logging configuration
log:
# Log level for the Teleport process.
Expand Down

0 comments on commit ce9b679

Please sign in to comment.