flux cd refactoring enable git repo, and global resources deploy
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- backups
|
||||
- nextcloud
|
||||
- onlyoffice
|
||||
- whiteboard
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: full-stack-sync
|
||||
spec:
|
||||
interval: 1m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: cloud-limbosolutions-com
|
||||
namespace: cloud-limbosolutions-com
|
||||
path: deploy/kustomization.yaml
|
||||
prune: true
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: flux-sops-age
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: GitRepository
|
||||
metadata:
|
||||
name: cloud-limbosolutions-com
|
||||
spec:
|
||||
interval: 1m0s
|
||||
url: ssh://git@git.limbosolutions.com:2222/marcio.fernandes/nextcloud.git
|
||||
ref:
|
||||
branch: main
|
||||
secretRef:
|
||||
name: flux-repo-ssh-credentials
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: cloud-limbosolutions-com
|
||||
resources:
|
||||
- git-repo.yaml
|
||||
- full-stack-sync.yaml
|
||||
secretGenerator:
|
||||
- name: flux-repo-ssh-credentials
|
||||
files:
|
||||
- "identity=./.env.d/flux-repo-ssh-key"
|
||||
- "known_hosts=./.env.d/flux-repo-ssh-known_hosts"
|
||||
- "pubkey=./.env.d/flux-repo-ssh-key.pub"
|
||||
- name: flux-sops-age
|
||||
files:
|
||||
- "age.agekey=./.env.d/age.agekey"
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
@@ -2,7 +2,6 @@ apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: cloud-limbosolutions-com-tls
|
||||
namespace: cloud-limbosolutions-com
|
||||
spec:
|
||||
secretName: cloud-limbosolutions-com-tls
|
||||
issuerRef:
|
||||
@@ -10,4 +9,3 @@ spec:
|
||||
kind: ClusterIssuer
|
||||
dnsNames:
|
||||
- cloud.limbosolutions.com
|
||||
renewBefore: 360h
|
||||
@@ -1,6 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: cloud-limbosolutions-com
|
||||
|
||||
resources:
|
||||
- ./certificate.yaml
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-same-namespace-ingress
|
||||
spec:
|
||||
endpointSelector: {} # All pods in this namespace
|
||||
ingress:
|
||||
- fromEndpoints:
|
||||
- matchExpressions:
|
||||
- key: k8s:io.kubernetes.pod.namespace
|
||||
operator: In
|
||||
values:
|
||||
- cloud-limbosolutions-com
|
||||
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-same-namespace-ingress
|
||||
spec:
|
||||
endpointSelector: {} # All pods in this namespace
|
||||
ingress:
|
||||
- fromEndpoints:
|
||||
- matchExpressions:
|
||||
- key: k8s:io.kubernetes.pod.namespace
|
||||
operator: In
|
||||
values:
|
||||
- cloud-limbosolutions-com
|
||||
|
||||
---
|
||||
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-traefik-to-nextcloud-ingress
|
||||
spec:
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: nextcloud
|
||||
|
||||
ingress:
|
||||
# -------------------------------------------------------------
|
||||
# Allow Traefik (internal and public) to reach nextcloud web port
|
||||
# -------------------------------------------------------------
|
||||
- fromEndpoints:
|
||||
- matchLabels:
|
||||
app.kubernetes.io/name: traefik
|
||||
matchExpressions:
|
||||
- key: k8s:io.kubernetes.pod.namespace
|
||||
operator: In
|
||||
values:
|
||||
- traefik
|
||||
- traefik-public
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "80"
|
||||
|
||||
protocol: TCP
|
||||
|
||||
---
|
||||
|
||||
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-traefik-to-onlyoffice-ingress
|
||||
spec:
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
app: onlyoffice
|
||||
|
||||
ingress:
|
||||
# -------------------------------------------------------------
|
||||
# Allow Traefik (internal and public) to reach onlyoffice web port
|
||||
# -------------------------------------------------------------
|
||||
- fromEndpoints:
|
||||
- matchLabels:
|
||||
app.kubernetes.io/name: traefik
|
||||
matchExpressions:
|
||||
- key: k8s:io.kubernetes.pod.namespace
|
||||
operator: In
|
||||
values:
|
||||
- traefik
|
||||
- traefik-public
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "80"
|
||||
|
||||
protocol: TCP
|
||||
---
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-traefik-to-whiteboard-ingress
|
||||
spec:
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
app: nextcloud-whiteboard
|
||||
|
||||
ingress:
|
||||
# -------------------------------------------------------------
|
||||
# Allow Traefik (internal and public) to reach whiteboard ws
|
||||
# -------------------------------------------------------------
|
||||
- fromEndpoints:
|
||||
- matchLabels:
|
||||
app.kubernetes.io/name: traefik
|
||||
matchExpressions:
|
||||
- key: k8s:io.kubernetes.pod.namespace
|
||||
operator: In
|
||||
values:
|
||||
- traefik
|
||||
- traefik-public
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "3002"
|
||||
|
||||
protocol: TCP
|
||||
@@ -1,8 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: cloud-limbosolutions-com
|
||||
|
||||
resources:
|
||||
- ./ingress-web-public.yaml
|
||||
- ./ingress-web.yaml
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: cloud-limbosolutions-com
|
||||
|
||||
resources:
|
||||
- ./ingress.yaml
|
||||
- ./middlewares.yaml
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: cloud-limbosolutions-com
|
||||
|
||||
resources:
|
||||
- ./middlewares.yaml
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: cloud-limbosolutions-com
|
||||
resources:
|
||||
- global
|
||||
- nextcloud
|
||||
- onlyoffice
|
||||
- whiteboard
|
||||
#- nextcloud
|
||||
#- backups
|
||||
#- onlyoffice
|
||||
#- whiteboard
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: cloud-limbosolutions-com
|
||||
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
@@ -12,6 +11,9 @@ secretGenerator:
|
||||
- ./.env.d/nextcloud-mariadb.env
|
||||
|
||||
resources:
|
||||
- ./storage-limbosolutions-com
|
||||
- storage-limbosolutions-com
|
||||
- ./mariadb-deploy.yaml
|
||||
- ./ingress-web-public.yaml
|
||||
- ./ingress-web.yaml
|
||||
- ./network-policies.yaml
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-traefik-to-nextcloud-ingress
|
||||
spec:
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: nextcloud
|
||||
|
||||
ingress:
|
||||
# -------------------------------------------------------------
|
||||
# Allow Traefik (internal and public) to reach nextcloud web port
|
||||
# -------------------------------------------------------------
|
||||
- fromEndpoints:
|
||||
- matchLabels:
|
||||
app.kubernetes.io/name: traefik
|
||||
matchExpressions:
|
||||
- key: k8s:io.kubernetes.pod.namespace
|
||||
operator: In
|
||||
values:
|
||||
- traefik
|
||||
- traefik-public
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "80"
|
||||
|
||||
protocol: TCP
|
||||
@@ -0,0 +1,2 @@
|
||||
**
|
||||
!.gitignore
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: onlyoffice-web-public
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-public
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`office.limbosolutions.com`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: onlyoffice
|
||||
port: 80
|
||||
middlewares:
|
||||
- name: onlyoffice-headers
|
||||
- name: onlyoffice-security-headers
|
||||
- name: rate-limit
|
||||
|
||||
tls:
|
||||
secretName: office-limbosolutions-com-tls
|
||||
@@ -1,14 +1,13 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: office-limbosolutions-com
|
||||
name: onlyoffice-web
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
kubernetes.io/ingress.class: traefik
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
- public-https
|
||||
routes:
|
||||
- match: Host(`office.limbosolutions.com`)
|
||||
kind: Rule
|
||||
@@ -8,9 +8,11 @@ secretGenerator:
|
||||
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
namespace: cloud-limbosolutions-com
|
||||
|
||||
resources:
|
||||
- ./deployment.yaml
|
||||
- ./service.yaml
|
||||
- ./pvc.yaml
|
||||
- ./middlewares.yaml
|
||||
- ./network-policies.yaml
|
||||
- ./ingress-web-public.yaml
|
||||
@@ -0,0 +1,28 @@
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-traefik-to-onlyoffice-ingress
|
||||
spec:
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
app: onlyoffice
|
||||
|
||||
ingress:
|
||||
# -------------------------------------------------------------
|
||||
# Allow Traefik (internal and public) to reach onlyoffice web port
|
||||
# -------------------------------------------------------------
|
||||
- fromEndpoints:
|
||||
- matchLabels:
|
||||
app.kubernetes.io/name: traefik
|
||||
matchExpressions:
|
||||
- key: k8s:io.kubernetes.pod.namespace
|
||||
operator: In
|
||||
values:
|
||||
- traefik
|
||||
- traefik-public
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "80"
|
||||
|
||||
protocol: TCP
|
||||
---
|
||||
@@ -1,18 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nextcloud-whiteboard
|
||||
name: whiteboard
|
||||
labels:
|
||||
app: nextcloud-whiteboard
|
||||
app: whiteboard
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nextcloud-whiteboard
|
||||
app: whiteboard
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nextcloud-whiteboard
|
||||
app: whiteboard
|
||||
spec:
|
||||
containers:
|
||||
- name: whiteboard-ws
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: whiteboard-web-public
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-public
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls:
|
||||
secretName: cloud-limbosolutions-com-tls
|
||||
domains:
|
||||
- main: cloud.limbosolutions.com
|
||||
|
||||
routes:
|
||||
|
||||
- match: Host(`cloud.limbosolutions.com`) && PathPrefix(`/whiteboard`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: whiteboard
|
||||
port: 3002
|
||||
middlewares:
|
||||
- name: nextcloud-security-headers
|
||||
- name: rate-limit
|
||||
- name: nextcloud-deny-paths
|
||||
- name: nextcloud-wellknown
|
||||
- name: nextcloud-hostmeta
|
||||
- name: nextcloud-dav
|
||||
- name: strip-whiteboard
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: whiteboard-web
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls:
|
||||
secretName: cloud-limbosolutions-com-tls
|
||||
domains:
|
||||
- main: cloud.limbosolutions.com
|
||||
|
||||
routes:
|
||||
|
||||
- match: Host(`cloud.limbosolutions.com`) && PathPrefix(`/whiteboard`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: whiteboard
|
||||
port: 3002
|
||||
middlewares:
|
||||
- name: nextcloud-security-headers
|
||||
- name: rate-limit
|
||||
- name: nextcloud-deny-paths
|
||||
- name: nextcloud-wellknown
|
||||
- name: nextcloud-hostmeta
|
||||
- name: nextcloud-dav
|
||||
- name: strip-whiteboard
|
||||
@@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
secretGenerator:
|
||||
- name: nextcloud-whiteboard
|
||||
- name: whiteboard
|
||||
envs:
|
||||
- ./.env.d/whiteboard.env
|
||||
|
||||
@@ -12,3 +12,7 @@ generatorOptions:
|
||||
resources:
|
||||
- ./deployment.yaml
|
||||
- ./service.yaml
|
||||
- ./middlewares.yaml
|
||||
- ./network-policies.yaml
|
||||
- ./ingress-web-public.yaml
|
||||
- ./ingress-web.yaml
|
||||
@@ -0,0 +1,27 @@
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-traefik-to-whiteboard-ingress
|
||||
spec:
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
app: nextcloud-whiteboard
|
||||
|
||||
ingress:
|
||||
# -------------------------------------------------------------
|
||||
# Allow Traefik (internal and public) to reach whiteboard ws
|
||||
# -------------------------------------------------------------
|
||||
- fromEndpoints:
|
||||
- matchLabels:
|
||||
app.kubernetes.io/name: traefik
|
||||
matchExpressions:
|
||||
- key: k8s:io.kubernetes.pod.namespace
|
||||
operator: In
|
||||
values:
|
||||
- traefik
|
||||
- traefik-public
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "3002"
|
||||
|
||||
protocol: TCP
|
||||
@@ -1,10 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nextcloud-whiteboard
|
||||
name: whiteboard
|
||||
spec:
|
||||
selector:
|
||||
app: nextcloud-whiteboard
|
||||
app: whiteboard
|
||||
ports:
|
||||
- name: ws
|
||||
port: 3002
|
||||
Reference in New Issue
Block a user