linkerd2/chart/templates/identity.yaml

104 lines
2.5 KiB
YAML

{{with .Values -}}
{{if .Identity -}}
---
###
### Identity Controller Service
###
{{- if .Identity.Issuer}}
---
kind: Secret
apiVersion: v1
metadata:
name: linkerd-identity-issuer
namespace: {{.Namespace}}
labels:
{{.ControllerComponentLabel}}: identity
annotations:
{{.CreatedByAnnotation}}: {{.CliVersion}}
{{- if .Identity.Issuer.CrtExpiryAnnotation}}
{{.Identity.Issuer.CrtExpiryAnnotation}}: {{.Identity.Issuer.CrtExpiry}}
{{- end}}
data:
crt.pem: {{b64enc .Identity.Issuer.CrtPEM}}
key.pem: {{b64enc .Identity.Issuer.KeyPEM}}
{{- end}}
---
kind: Service
apiVersion: v1
metadata:
name: linkerd-identity
namespace: {{.Namespace}}
labels:
{{.ControllerComponentLabel}}: identity
annotations:
{{.CreatedByAnnotation}}: {{.CliVersion}}
spec:
type: ClusterIP
selector:
{{.ControllerComponentLabel}}: identity
ports:
- name: grpc
port: 8080
targetPort: 8080
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: linkerd-identity
namespace: {{.Namespace}}
labels:
{{.ControllerComponentLabel}}: identity
annotations:
{{.CreatedByAnnotation}}: {{.CliVersion}}
spec:
replicas: {{.Identity.Replicas}}
template:
metadata:
labels:
{{.ControllerComponentLabel}}: identity
annotations:
{{.CreatedByAnnotation}}: {{.CliVersion}}
spec:
serviceAccountName: linkerd-identity
containers:
- name: identity
ports:
- name: grpc
containerPort: 8080
- name: admin-http
containerPort: 9990
image: {{.ControllerImage}}
imagePullPolicy: {{.ImagePullPolicy}}
args:
- "identity"
- "-log-level={{.ControllerLogLevel}}"
volumeMounts:
- mountPath: /var/run/linkerd/config
name: config
- mountPath: /var/run/linkerd/identity/issuer
name: identity-issuer
livenessProbe:
httpGet:
path: /ping
port: 9990
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 9990
failureThreshold: 7
{{ with .IdentityResources -}}
{{- template "resources" . }}
{{ end -}}
securityContext:
runAsUser: {{.ControllerUID}}
volumes:
- name: config
configMap:
name: linkerd-config
- name: identity-issuer
secret:
secretName: linkerd-identity-issuer
{{end -}}
{{end -}}