switch to zot
This commit is contained in:
@ -28,6 +28,7 @@ spec:
|
||||
value: $(params.environment)
|
||||
- name: namespace
|
||||
value: $(params.namespace)
|
||||
|
||||
- name: cleanup-dns-records
|
||||
retries: 3
|
||||
taskRef:
|
||||
|
@ -55,6 +55,7 @@ spec:
|
||||
script: |
|
||||
#!/bin/sh
|
||||
ansible-playbook /src/playbooks/systems/system-bootstrap/playbook.yml
|
||||
|
||||
- name: prepare-k3s
|
||||
env:
|
||||
- name: SP_ENV
|
||||
@ -71,7 +72,9 @@ spec:
|
||||
script: |-
|
||||
#!/bin/sh
|
||||
ansible-playbook /src/playbooks/systems/k3s-bootstrap/playbook.yml
|
||||
- name: prepare-kubeconfig
|
||||
|
||||
- name: get-config
|
||||
image: git.badhouseplants.net/softplayer/softplayer-coskgne:latest
|
||||
env:
|
||||
- name: SP_ENV
|
||||
value: $(params.environment)
|
||||
@ -83,10 +86,12 @@ spec:
|
||||
value: /tmp/outputs/ssh_key
|
||||
- name: ANSIBLE_HOST_KEY_CHECKING
|
||||
value: "false"
|
||||
image: git.badhouseplants.net/softplayer/softplayer-coskgne:latest
|
||||
script: |-
|
||||
script: |
|
||||
#!/bin/sh
|
||||
ansible-playbook /src/playbooks/other/k8s-create-user/playbook.yml
|
||||
ansible-playbook /src/playbooks/other/k3s-save-config/playbook.yml
|
||||
export SERVICE_ENTRYPOINT=$(cat /tmp/outputs/inventory.yaml | yq '.servers.vars.service_entrypoint')
|
||||
sed -i "s/127.0.0.1/${SERVICE_ENTRYPOINT}/" /tmp/outputs/config
|
||||
|
||||
- name: save-kubeconfig
|
||||
image: alpine/k8s:1.29.2
|
||||
script: |-
|
||||
@ -97,9 +102,10 @@ spec:
|
||||
kubectl create secret generic \
|
||||
"$(params.environment)"-config \
|
||||
--namespace "$(params.namespace)" \
|
||||
--from-file=value=/tmp/outputs/admin-default-config
|
||||
--from-file=value=/tmp/outputs/config
|
||||
|
||||
workspaces:
|
||||
- name: outputs
|
||||
- name: outputs
|
||||
description: A folder to store outputs
|
||||
optional: false
|
||||
mountPath: /tmp/outputs
|
||||
|
@ -13,13 +13,6 @@ spec:
|
||||
- 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: setup-dns
|
||||
image: git.badhouseplants.net/softplayer/softplayer-coskgne:latest
|
||||
env:
|
||||
@ -32,9 +25,3 @@ spec:
|
||||
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
|
||||
|
@ -30,6 +30,11 @@ spec:
|
||||
"$(params.environment)" \
|
||||
--namespace "$(params.namespace)" \
|
||||
"softplayer.net/status=installing-dependencies"
|
||||
- name: get-yq
|
||||
image: mikefarah/yq
|
||||
script: |-
|
||||
#!/bin/sh
|
||||
cp $(which yq) /tmp/outputs/yq
|
||||
- name: deploy-helmfile
|
||||
image: ghcr.io/helmfile/helmfile:v0.163.1
|
||||
env:
|
||||
@ -37,6 +42,7 @@ spec:
|
||||
value: /tmp/outputs/config
|
||||
script: |-
|
||||
#!/bin/sh
|
||||
cp /tmp/outputs/yq /usr/bin/yq
|
||||
mkdir -p /src
|
||||
git clone https://git.badhouseplants.net/softplayer/softplayer-helmfile.git /src/helmfile
|
||||
cd /src/helmfile/workload && helmfile sync
|
||||
|
@ -44,4 +44,7 @@ spec:
|
||||
--chart=helmrelease \
|
||||
--values-from Secret/$SP_APPLICATION-config \
|
||||
--kubeconfig-secret-ref=$SP_ENV-config \
|
||||
--target-namespace=default
|
||||
--target-namespace=default --export \
|
||||
| yq '.spec.storageNamespace="helm-installations"' \
|
||||
| kubectl create -f -
|
||||
flux reconcile helmrelease --namespace=$SP_ACCOUNT $SP_APPLICATION
|
||||
|
@ -30,6 +30,15 @@ spec:
|
||||
"$(params.environment)" \
|
||||
--namespace "$(params.namespace)" \
|
||||
"softplayer.net/status=infra-bootstrapping"
|
||||
- name: get-dotenv-from-configmap
|
||||
image: alpine/k8s:1.29.2
|
||||
script: |-
|
||||
#!/bin/sh
|
||||
kubectl get configmap -o yaml \
|
||||
$(params.environment) \
|
||||
--namespace "$(params.namespace)" \
|
||||
| yq '.data.vars' > /tmp/outputs/dotenv
|
||||
|
||||
- name: create-hetzner-infra
|
||||
image: git.badhouseplants.net/softplayer/softplayer-coskgne:latest
|
||||
env:
|
||||
@ -42,7 +51,9 @@ spec:
|
||||
- name: SOPS_AGE_KEY
|
||||
value: {{ .Values.providers.hetzner.ageKey }}
|
||||
script: |-
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
export $(grep -v '^#' /tmp/outputs/dotenv | xargs -0)
|
||||
env
|
||||
ansible-playbook /src/playbooks/providers/hetzner/playbook.yml
|
||||
- name: save-inventory
|
||||
image: alpine/k8s:1.29.2
|
||||
|
Reference in New Issue
Block a user