softplayer-helmfile/charts/tekton-pipelines/templates/tasks/prepare-dns-records.yml

49 lines
1.4 KiB
YAML
Raw Normal View History

2024-05-04 16:42:28 +00:00
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: prepare-dns-records
namespace: {{ .Values.pipelineNamespace }}
labels:
{{- include "tekton-pipelines.labels" . | nindent 4 }}
spec:
params:
- name: namespace
type: string
- name: environment
type: string
steps:
- name: get-provider-outputs
image: alpine/k8s:1.29.2
script: |-
#!/bin/sh
kubectl get configmap "$(params.environment)"-provider-outputs \
--namespace "$(params.namespace)" -o yaml \
| yq '.data."provider_outputs.yaml"' > /tmp/outputs/provider_outputs.yaml
- name: annonate-an-env-cm
image: alpine/k8s:1.29.2
script: |-
#!/bin/sh
kubectl annotate --overwrite configmap \
"$(params.environment)" \
--namespace "$(params.namespace)" \
"softplayer.net/status=setting-up-dns"
- name: setup-dns
image: git.badhouseplants.net/softplayer/softplayer-coskgne:latest
env:
- name: SP_STATE
value: present
- name: SP_ENV
value: $(params.environment)
- name: SOPS_AGE_KEY
value: {{ .Values.providers.hetzner.ageKey }}
script: |-
#!/bin/sh
ansible-playbook /src/playbooks/other/cloudflare/playbook.yml
workspaces:
- name: outputs
description: A folder to store outputs
optional: false
mountPath: /tmp/outputs