Add conditional;Inject manifests
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Danny Bessems 2022-07-15 12:14:12 +02:00
parent 2f976898eb
commit 54caff8fb6
4 changed files with 38 additions and 2 deletions

View File

@ -215,7 +215,7 @@
loop_control:
label: "{{ item.organization + '/' + item.body.name }}"
# when: gitea_existing_config.json.data is undefined
when: (gitea_existing_config.json is undefined) or (gitea_existing_config.json.data | length == 0)
module_defaults:
ansible.builtin.uri:

View File

@ -53,7 +53,19 @@
docker://{{ item }} \
docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }}
chdir: /opt/metacluster/container-images
loop: "{{ containerimages.results | map(attribute='stdout_lines') | flatten + dependencies.container_images }}"
loop: "{{ (containerimages.results | map(attribute='stdout_lines') | flatten) + dependencies.container_images }}"
- name: Inject manifests
ansible.builtin.template:
src: "{{ item.type }}.j2"
dest: /var/lib/rancher/k3s/server/manifests/{{ item.name }}-manifest.yaml
owner: root
group: root
mode: 0600
when: item is defined
loop: "{{ lookup('ansible.builtin.dict', components) | map(attribute='value.manifests') | list }}"
loop_control:
label: "{{ item.key }}"
- name: Compress tarballs
community.general.archive:

View File

@ -0,0 +1,7 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: {{ item.name }}
namespace: {{ item.namespace }}
spec:
{{ item.config }}

View File

@ -7,6 +7,9 @@ platform:
- name: traefik
namespace: kube-system
config: |2
# ingressRoute:
# dashboard:
# enabled: true
ports:
ssh:
port: 8022
@ -23,6 +26,8 @@ platform:
url: https://dl.gitea.io/charts/
- name: argo
url: https://argoproj.github.io/argo-helm
- name: sealed-secrets
url: https://bitnami-labs.github.io/sealed-secrets
components:
@ -78,6 +83,18 @@ components:
paths:
- path: /
pathType: Prefix
manifests:
- type: ingressroutetcp
name: gitea-ssh
namespace: gitea
config: |2
entryPoints:
- ssh
routes:
- match: HostSNI(`*`)
services:
- name: gitea-ssh
port: 22
argo-cd:
helm: