Mabe this is how flux works?
This commit is contained in:
parent
7ef72afc56
commit
1c281c672e
4
flux/cluster/apps/kustomization.yaml
Normal file
4
flux/cluster/apps/kustomization.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- test
|
16
flux/cluster/apps/test/ingress.yaml
Normal file
16
flux/cluster/apps/test/ingress.yaml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: whoami-deployment-ingress
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: "whoami.asraphiel.dev"
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: whoami-deployment-service
|
||||||
|
port:
|
||||||
|
number: 80
|
5
flux/cluster/apps/test/kustomization.yaml
Normal file
5
flux/cluster/apps/test/kustomization.yaml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- pain.yaml
|
||||||
|
- gotk-sync.yaml
|
25
flux/cluster/apps/test/pain.yaml
Normal file
25
flux/cluster/apps/test/pain.yaml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: whoami-deployment
|
||||||
|
labels:
|
||||||
|
app: whoami-deployment
|
||||||
|
keel.sh/policy: force
|
||||||
|
keel.sh/match-tag: "true"
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: whoami-deployment
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: whoami-deployment
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: whoami-deployment
|
||||||
|
imagePullPolicy: Always
|
||||||
|
image: traefik/whoami
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
|
11
flux/cluster/apps/test/service.yaml
Normal file
11
flux/cluster/apps/test/service.yaml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: whoami-deployment-service
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: whoami-deployment
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
|
@ -1,15 +1,14 @@
|
||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
|
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: podinfo
|
name: apps
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 5m0s
|
interval: 10m0s
|
||||||
path: ./kustomize
|
dependsOn:
|
||||||
|
- name: core
|
||||||
|
path: ./flux/cluster/apps
|
||||||
prune: true
|
prune: true
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: podinfo
|
name: flux-system
|
||||||
targetNamespace: default
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: source.toolkit.fluxcd.io/v1beta2
|
|
||||||
kind: GitRepository
|
|
||||||
metadata:
|
|
||||||
name: podinfo
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
interval: 30s
|
|
||||||
ref:
|
|
||||||
branch: master
|
|
||||||
url: https://github.com/stefanprodan/podinfo
|
|
||||||
|
|
Loading…
Reference in a new issue