174 lines
5.2 KiB
HCL
174 lines
5.2 KiB
HCL
resource "kubectl_manifest" "Job_taiga-createinitialtemplates" {
|
|
yaml_body = <<-EOF
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: "${var.instance}-${var.component}-post-config"
|
|
namespace: "${var.namespace}"
|
|
labels: ${jsonencode(local.postcfg_all_labels)}
|
|
spec:
|
|
backoffLimit: 4
|
|
parallelism: 1
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: postconfig
|
|
image: "${var.images.back.registry}/${var.images.back.repository}:${var.images.back.tag}"
|
|
imagePullPolicy: ${var.images.back.pull_policy}
|
|
command: ["/scripts/postconfig.py"]
|
|
env:
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: ${var.instance}-${var.component}-pg-app
|
|
key: password
|
|
envFrom:
|
|
- secretRef:
|
|
name: ${kubectl_manifest.secret.name}
|
|
- configMapRef:
|
|
name: ${kubectl_manifest.cm_env_back.name}
|
|
volumeMounts:
|
|
- name: scripts
|
|
mountPath: /scripts
|
|
volumes:
|
|
- name: scripts
|
|
configMap:
|
|
name: ${kubectl_manifest.cm_scripts.name}
|
|
defaultMode: 0755
|
|
EOF
|
|
}
|
|
|
|
backoffLimit: 3
|
|
completionMode: NonIndexed
|
|
manualSelector: false
|
|
parallelism: 1
|
|
podReplacementPolicy: TerminatingOrFailed
|
|
selector:
|
|
matchLabels:
|
|
batch.kubernetes.io/controller-uid: c27d1f22-f48c-4c32-8a86-f759c21583bd
|
|
suspend: false
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
mayfly.cloud.namecheap.com/expire: 120h
|
|
creationTimestamp: null
|
|
labels:
|
|
batch.kubernetes.io/controller-uid: c27d1f22-f48c-4c32-8a86-f759c21583bd
|
|
batch.kubernetes.io/job-name: default--crd-tekton-triggers--agent
|
|
controller-uid: c27d1f22-f48c-4c32-8a86-f759c21583bd
|
|
job-name: default--crd-tekton-triggers--agent
|
|
spec:
|
|
containers:
|
|
- args:
|
|
- install
|
|
env:
|
|
- name: NAMESPACE
|
|
value: default
|
|
- name: NAME
|
|
value: crd-tekton-triggers
|
|
- name: OPTIONS_HASH
|
|
value: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
|
|
- name: COMMIT_ID
|
|
value: 05ce09772797fb06ab0ca3355847dab9b3e5cde3
|
|
- name: LOG_LEVEL
|
|
value: info
|
|
- name: RUST_BACKTRACE
|
|
value: "1"
|
|
- name: RUST_LOG
|
|
value: info,controller=info,agent=info
|
|
image: docker.io/sebt3/vynil-agent:0.2.11
|
|
imagePullPolicy: IfNotPresent
|
|
name: install
|
|
resources: {}
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /dist
|
|
name: dist
|
|
readOnly: true
|
|
subPath: addons
|
|
- mountPath: /src
|
|
name: package
|
|
dnsPolicy: ClusterFirst
|
|
initContainers:
|
|
- args:
|
|
- template
|
|
- -s
|
|
- /src/crd/tekton-triggers/
|
|
- -t
|
|
- install
|
|
env:
|
|
- name: NAMESPACE
|
|
value: default
|
|
- name: NAME
|
|
value: crd-tekton-triggers
|
|
- name: OPTIONS_HASH
|
|
value: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
|
|
- name: COMMIT_ID
|
|
value: 05ce09772797fb06ab0ca3355847dab9b3e5cde3
|
|
- name: LOG_LEVEL
|
|
value: info
|
|
- name: RUST_BACKTRACE
|
|
value: "1"
|
|
- name: RUST_LOG
|
|
value: info,controller=info,agent=info
|
|
image: docker.io/sebt3/vynil-agent:0.2.11
|
|
imagePullPolicy: IfNotPresent
|
|
name: template
|
|
resources: {}
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /src
|
|
name: dist
|
|
readOnly: true
|
|
subPath: addons
|
|
- mountPath: /dest
|
|
name: package
|
|
- args:
|
|
- plan
|
|
env:
|
|
- name: NAMESPACE
|
|
value: default
|
|
- name: NAME
|
|
value: crd-tekton-triggers
|
|
- name: OPTIONS_HASH
|
|
value: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
|
|
- name: COMMIT_ID
|
|
value: 05ce09772797fb06ab0ca3355847dab9b3e5cde3
|
|
- name: LOG_LEVEL
|
|
value: info
|
|
- name: RUST_BACKTRACE
|
|
value: "1"
|
|
- name: RUST_LOG
|
|
value: info,controller=info,agent=info
|
|
image: docker.io/sebt3/vynil-agent:0.2.11
|
|
imagePullPolicy: IfNotPresent
|
|
name: plan
|
|
resources: {}
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /dist
|
|
name: dist
|
|
readOnly: true
|
|
subPath: addons
|
|
- mountPath: /src
|
|
name: package
|
|
restartPolicy: Never
|
|
schedulerName: default-scheduler
|
|
securityContext:
|
|
fsGroup: 65534
|
|
runAsGroup: 65534
|
|
runAsUser: 65534
|
|
serviceAccount: vynil-agent
|
|
serviceAccountName: vynil-agent
|
|
terminationGracePeriodSeconds: 30
|
|
volumes:
|
|
- name: dist
|
|
persistentVolumeClaim:
|
|
claimName: addons-distrib
|
|
- emptyDir:
|
|
sizeLimit: 500Mi
|
|
name: package |