diff --git a/clusters/k3s-cluster/apps.yaml b/clusters/k3s-cluster/apps.yaml new file mode 100644 index 0000000..d3e6fdf --- /dev/null +++ b/clusters/k3s-cluster/apps.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: apps + namespace: flux-system +spec: + interval: 10m0s + dependsOn: + - name: infra-configs + sourceRef: + kind: GitRepository + name: flux-system + path: ./apps + prune: true + wait: true + timeout: 5m0s diff --git a/clusters/k3s-cluster/argo-rollouts/kustomization.yaml b/clusters/k3s-cluster/argo-rollouts/kustomization.yaml new file mode 100644 index 0000000..4cb8110 --- /dev/null +++ b/clusters/k3s-cluster/argo-rollouts/kustomization.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: argo-rollouts +resources: + - namespace.yaml + - https://github.com/argoproj/argo-rollouts/releases/download/v1.7.2/install.yaml diff --git a/clusters/k3s-cluster/argo-rollouts/namespace.yaml b/clusters/k3s-cluster/argo-rollouts/namespace.yaml new file mode 100644 index 0000000..eef539f --- /dev/null +++ b/clusters/k3s-cluster/argo-rollouts/namespace.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: argo-rollouts diff --git a/clusters/k3s-cluster/argocd/kustomization.yaml b/clusters/k3s-cluster/argocd/kustomization.yaml new file mode 100644 index 0000000..e3b326a --- /dev/null +++ b/clusters/k3s-cluster/argocd/kustomization.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: argocd +resources: + - namespace.yaml + - https://raw.githubusercontent.com/argoproj/argo-cd/v2.13.3/manifests/install.yaml +patches: + - patch: | + apiVersion: v1 + kind: Service + metadata: + name: argocd-server + spec: + type: LoadBalancer + target: + kind: Service + labelSelector: app.kubernetes.io/name=argocd-server diff --git a/clusters/k3s-cluster/argocd/namespace.yaml b/clusters/k3s-cluster/argocd/namespace.yaml new file mode 100644 index 0000000..42add95 --- /dev/null +++ b/clusters/k3s-cluster/argocd/namespace.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: argocd diff --git a/clusters/k3s-cluster/flux-system/gotk-components.yaml b/clusters/k3s-cluster/flux-system/gotk-components.yaml new file mode 100644 index 0000000..e69de29 diff --git a/clusters/k3s-cluster/flux-system/gotk-sync.yaml b/clusters/k3s-cluster/flux-system/gotk-sync.yaml new file mode 100644 index 0000000..e69de29 diff --git a/clusters/k3s-cluster/flux-system/kustomization.yaml b/clusters/k3s-cluster/flux-system/kustomization.yaml new file mode 100644 index 0000000..f3a60fb --- /dev/null +++ b/clusters/k3s-cluster/flux-system/kustomization.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - gotk-components.yaml + - gotk-sync.yaml +patches: + - patch: | + apiVersion: apps/v1 + kind: Deployment + metadata: + name: all + spec: + template: + spec: + containers: + - name: manager + env: + - name: "HTTPS_PROXY" + value: "http://proxy-lb.lab.kill0.net.:3128" + - name: "NO_PROXY" + value: ".cluster.local.,.cluster.local,.svc,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16" + target: + kind: Deployment + labelSelector: app.kubernetes.io/part-of=flux diff --git a/clusters/k3s-cluster/infrastructure.yaml b/clusters/k3s-cluster/infrastructure.yaml new file mode 100644 index 0000000..9af44ec --- /dev/null +++ b/clusters/k3s-cluster/infrastructure.yaml @@ -0,0 +1,60 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: infra-loadbalancer + namespace: flux-system +spec: + interval: 1h + retryInterval: 1m + timeout: 5m + sourceRef: + kind: GitRepository + name: flux-system + path: ./infrastructure/loadbalancer + prune: true + wait: true + patches: + - patch: | + - op: replace + path: /spec/addresses + value: + - 10.100.101.16/28 + target: + kind: IPAddressPool + name: first-pool +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: infra-controllers + namespace: flux-system +spec: + dependsOn: + - name: infra-loadbalancer + interval: 1h + retryInterval: 1m + timeout: 5m + sourceRef: + kind: GitRepository + name: flux-system + path: ./infrastructure/controllers + prune: true + wait: true +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: infra-configs + namespace: flux-system +spec: + dependsOn: + - name: infra-controllers + interval: 1h + retryInterval: 1m + timeout: 5m + sourceRef: + kind: GitRepository + name: flux-system + path: ./infrastructure/configs + prune: true