Implement dynamic envs (#19)
Reviewed-on: https://git.badhouseplants.net/allanger/badhouseplants-net/pulls/19
This commit is contained in:
29
kube/applicationset.yaml
Normal file
29
kube/applicationset.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: badhouseplants-net
|
||||
namespace: argo-system
|
||||
spec:
|
||||
generators:
|
||||
- list:
|
||||
elements: []
|
||||
template:
|
||||
metadata:
|
||||
name: "{{ app }}-{{ name }}"
|
||||
namespace: argo-system
|
||||
labels:
|
||||
branch: "{{ name }}"
|
||||
application: "{{ app }}"
|
||||
spec:
|
||||
project: "default"
|
||||
source:
|
||||
helm:
|
||||
valueFiles:
|
||||
- values.yaml
|
||||
values: "{{ value }}"
|
||||
repoURL: https://git.badhouseplants.net/api/packages/allanger/helm
|
||||
targetRevision: "{{ chart_version }}"
|
||||
chart: badhouseplants-net
|
||||
destination:
|
||||
server: "https://kubernetes.default.svc"
|
||||
namespace: "{{ app }}-{{ name }}"
|
8
kube/main.yaml
Normal file
8
kube/main.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
- name: application
|
||||
app: badhouseplants
|
||||
branch: $ARGO_APP_BRANCH
|
||||
chart_version: $ARGO_APP_CHART_VERSION
|
||||
value: |
|
||||
hugo:
|
||||
image:
|
||||
tag: $ARGO_APP_IMAGE_TAG
|
16
kube/template.yaml
Normal file
16
kube/template.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
- name: $ARGO_APP_BRANCH
|
||||
app: badhouseplants
|
||||
branch: $ARGO_APP_BRANCH
|
||||
commit_sha: $ARGO_APP_IMAGE_TAG
|
||||
chart_version: $ARGO_APP_CHART_VERSION
|
||||
value: |
|
||||
namespace:
|
||||
name: badhouseplants-$ARGO_APP_BRANCH
|
||||
istio:
|
||||
hosts:
|
||||
- $ARGO_APP_HOSTNAME
|
||||
hugo:
|
||||
image:
|
||||
tag: $ARGO_APP_IMAGE_TAG
|
||||
baseURL: https://$ARGO_APP_HOSTNAME/
|
||||
buildDrafts: true
|
Reference in New Issue
Block a user