64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: zitadel-action-create-user
|
|
namespace: django
|
|
annotations:
|
|
kustomize.toolkit.fluxcd.io/force: enabled
|
|
spec:
|
|
backoffLimit: 2
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
sidecar.istio.io/inject: "false"
|
|
vault.hashicorp.com/agent-inject: "true"
|
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
vault.hashicorp.com/role: django
|
|
vault.hashicorp.com/agent-inject-secret-zitadel-token: secrets/data/vault/common/django_auth
|
|
vault.hashicorp.com/agent-inject-template-zitadel-token: |-
|
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
{{ index .Data.data "django_zitadel_access_token" }}
|
|
{{- end -}}
|
|
vault.hashicorp.com/agent-inject-secret-backend-basic: secrets/data/vault/common/django_auth
|
|
vault.hashicorp.com/agent-inject-template-backend-basic: |-
|
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
{{ index .Data.data "key" }}
|
|
{{- end -}}
|
|
spec:
|
|
serviceAccountName: django-vault
|
|
automountServiceAccountToken: true
|
|
restartPolicy: Never
|
|
imagePullSecrets:
|
|
- name: regcred
|
|
containers:
|
|
- name: apply
|
|
image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_7d0ec48b
|
|
imagePullPolicy: IfNotPresent
|
|
command: ["python", "/opt/action/apply.py"]
|
|
env:
|
|
- name: ZITADEL_URL
|
|
value: http://zitadel-idp-contour.zitadel.svc.cluster.local:8080
|
|
- name: ZITADEL_HOST
|
|
value: login.sarex.local.uralkali.com
|
|
- name: ZITADEL_ORG_NAME
|
|
value: zitadel
|
|
- name: ACTION_NAME
|
|
value: createUser
|
|
- name: FLOW_TYPE
|
|
value: "1"
|
|
- name: TRIGGER_TYPE
|
|
value: "2"
|
|
resources:
|
|
requests:
|
|
cpu: 20m
|
|
memory: 128Mi
|
|
volumeMounts:
|
|
- name: action
|
|
mountPath: /opt/action
|
|
readOnly: true
|
|
volumes:
|
|
- name: action
|
|
configMap:
|
|
name: zitadel-action-create-user
|