diff --git a/common/environments.yaml b/common/environments.yaml index 13a3ca2..3f3a457 100644 --- a/common/environments.yaml +++ b/common/environments.yaml @@ -1,5 +1,21 @@ + environments: badhouseplants: kubeContext: badhouseplants + values: + - velero: + enabled: true + - workload: + enabled: true + - backups: + enabled: false + etersoft: kubeContext: etersoft + values: + - velero: + enabled: false + - workload: + enabled: false + - backups: + enabled: true diff --git a/helmfile.yaml b/helmfile.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/installations/applications/helmfile.yaml b/installations/applications/helmfile.yaml index 906da59..465d9c8 100644 --- a/installations/applications/helmfile.yaml +++ b/installations/applications/helmfile.yaml @@ -5,7 +5,10 @@ bases: repositories: - name: softplayer-oci - url: registry.badhouseplants.net/softplayer/helm + url: zot.badhouseplants.net/softplayer/helm + oci: true + - name: allanger-oci + url: zot.badhouseplants.net/allanger/helm oci: true - name: requarks url: https://charts.js.wiki @@ -28,6 +31,8 @@ repositories: - name: allangers-charts url: ghcr.io/allanger/allangers-charts oci: true + - name: robjuz + url: https://robjuz.github.io/helm-charts/ releases: - name: authentik @@ -80,16 +85,16 @@ releases: - name: nrodionov chart: bitnami/wordpress - version: 22.4.20 + version: 23.1.7 namespace: applications inherit: - template: default-env-values - template: default-env-secrets - template: ext-database - - name: openvpn-xor - chart: softplayer-oci/openvpn-xor - version: 1.2.0 + - name: openvpn + chart: allanger-oci/openvpn + version: 0.0.1 namespace: applications inherit: - template: default-env-values @@ -152,3 +157,12 @@ releases: inherit: - template: default-env-values - template: default-env-secrets + + - name: kimai + chart: robjuz/kimai2 + namespace: applications + version: 4.2.3 + inherit: + - template: default-env-values + #- template: default-env-secrets + - template: ext-database diff --git a/installations/games/helmfile.yaml b/installations/games/helmfile.yaml index f48470c..55b7f84 100644 --- a/installations/games/helmfile.yaml +++ b/installations/games/helmfile.yaml @@ -14,7 +14,7 @@ releases: - name: minecraft chart: minecraft/minecraft namespace: games - version: 4.20.0 + version: 4.21.0 inherit: - template: ext-tcp-routes - template: default-env-values diff --git a/installations/platform/helmfile.yaml b/installations/platform/helmfile.yaml index 95380e0..70394d7 100644 --- a/installations/platform/helmfile.yaml +++ b/installations/platform/helmfile.yaml @@ -12,26 +12,41 @@ repositories: url: https://zotregistry.dev/helm-charts/ - name: bedag url: https://bedag.github.io/helm-charts/ - - name: percona - url: https://percona.github.io/percona-helm-charts/ + - name: minio-standalone + url: https://charts.min.io/ + - name: minio + url: https://operator.min.io/ + - name: fluxcd-community + url: https://fluxcd-community.github.io/helm-charts + - name: crossplane-stable + url: https://charts.crossplane.io/stable releases: - name: argocd chart: argo/argo-cd namespace: platform - version: 7.3.6 + condition: workload.enabled + version: 7.5.2 inherit: - template: default-env-values - template: default-env-secrets + + - name: flux + chart: fluxcd-community/flux2 + namespace: platform + condition: workload.enabled + version: 2.13.0 - name: db-operator namespace: platform chart: db-operator/db-operator - version: 1.27.2 + condition: workload.enabled + version: 1.28.0 - name: db-instances chart: db-operator/db-instances namespace: platform + condition: workload.enabled needs: - platform/db-operator version: 2.3.4 @@ -41,16 +56,44 @@ releases: - name: zot chart: zot/zot - version: 0.1.57 + version: 0.1.60 createNamespace: false namespace: platform + condition: workload.enabled inherit: - template: default-env-values - template: default-env-secrets - - name: pg-operator - chart: percona/pg-operator - installed: false - version: 2.4.0 - createNamespace: false + - name: minio + chart: minio-standalone/minio + version: 5.2.0 namespace: platform + condition: backups.enabled + inherit: + - template: default-env-values + - template: default-env-secrets + + - name: minio-operator + chart: minio/operator + version: 6.0.3 + namespace: platform + condition: workload.enabled + inherit: + - template: default-env-values + + - name: minio-tenant + chart: minio/tenant + version: 6.0.3 + namespace: platform + condition: workload.enabled + inherit: + - template: default-env-values + # - template: default-env-secrets + + - name: crossplane + chart: crossplane-stable/crossplane + version: 1.17.0 + namespace: platform + condition: workload.enabled + inherit: + - template: default-env-values diff --git a/installations/storage/helmfile.yaml b/installations/storage/helmfile.yaml index 169242a..f428706 100644 --- a/installations/storage/helmfile.yaml +++ b/installations/storage/helmfile.yaml @@ -8,15 +8,13 @@ repositories: url: https://charts.longhorn.io - name: rook-release url: https://charts.rook.io/release - - name: local-path-provisioner - url: git+https://github.com/rancher/local-path-provisioner@deploy/chart?ref=v0.0.28 releases: - name: rook-ceph chart: rook-release/rook-ceph installed: true namespace: rook-ceph - version: v1.14.9 + version: v1.14.6 inherit: - template: default-env-values @@ -24,7 +22,7 @@ releases: chart: rook-release/rook-ceph-cluster installed: true namespace: rook-ceph - version: v1.14.9 + version: v1.14.6 needs: - rook-ceph/rook-ceph inherit: @@ -40,10 +38,3 @@ releases: - template: default-env-secrets - template: ext-secret - - name: local-path-provisioner - chart: local-path-provisioner/local-path-provisioner - installed: false - createNamespace: false - namespace: kube-system - inherit: - - template: default-env-values diff --git a/installations/system/helmfile.yaml b/installations/system/helmfile.yaml index 4ad0030..4c311c9 100644 --- a/installations/system/helmfile.yaml +++ b/installations/system/helmfile.yaml @@ -24,8 +24,7 @@ repositories: url: https://piraeus.io/helm-charts/ - name: vmware-tanzu url: https://vmware-tanzu.github.io/helm-charts/ - - name: local-path-provisioner - url: git+https://github.com/rancher/local-path-provisioner@deploy/chart?ref=v0.0.28 + releases: - name: namespaces chart: '{{ requiredEnv "PWD" }}/charts/namespaces/chart' @@ -45,7 +44,7 @@ releases: - name: coredns chart: coredns/coredns - version: 1.31.0 + version: 1.32.0 namespace: kube-system inherit: - template: default-env-values @@ -55,6 +54,7 @@ releases: installed: true version: 3.0.5 namespace: kube-system + condition: velero.enabled needs: - kube-system/cilium inherit: @@ -62,7 +62,7 @@ releases: - name: cilium chart: cilium/cilium - version: 1.16.0 + version: 1.16.1 namespace: kube-system needs: - kube-system/coredns @@ -71,7 +71,7 @@ releases: - name: cert-manager chart: jetstack/cert-manager - version: 1.15.2 + version: 1.15.3 namespace: kube-system needs: - kube-system/cilium @@ -116,7 +116,7 @@ releases: - name: traefik chart: traefik/traefik - version: 30.0.2 + version: 30.1.0 namespace: kube-system needs: - kube-system/cilium @@ -126,16 +126,11 @@ releases: - name: velero chart: vmware-tanzu/velero namespace: kube-system - version: 7.1.4 + version: 7.1.5 + condition: velero.enabled needs: - kube-system/cilium inherit: - template: default-env-values - template: default-env-secrets - - - name: local-path-provisioner - chart: local-path-provisioner/local-path-provisioner - createNamespace: false - namespace: kube-system - inherit: - - template: default-env-values + - template: crd-management-hook diff --git a/manifests/app.yaml b/manifests/app.yaml new file mode 100644 index 0000000..e9199fd --- /dev/null +++ b/manifests/app.yaml @@ -0,0 +1,18 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: test-apps + namespace: platform +spec: + destination: + namespace: default + server: https://kubernetes.default.svc + project: default + syncPolicy: + automated: + prune: true + source: + path: manifests/postgresql-15.5.21.tgz + repoURL: https://gitea.badhouseplants.net/allanger/k8s-deployment.git + targetRevision: main + helm: {} diff --git a/manifests/bucket.yaml b/manifests/bucket.yaml new file mode 100644 index 0000000..d1e4063 --- /dev/null +++ b/manifests/bucket.yaml @@ -0,0 +1,12 @@ +apiVersion: minio.crossplane.io/v1 +kind: Bucket +metadata: + creationTimestamp: null + name: bucket-local-dev +spec: + forProvider: + region: us-east-1 + providerConfigRef: + name: provider-config +status: + atProvider: {} diff --git a/manifests/minio-secret.yaml b/manifests/minio-secret.yaml new file mode 100644 index 0000000..557f9fa --- /dev/null +++ b/manifests/minio-secret.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +stringData: + AWS_ACCESS_KEY_ID: minio + AWS_SECRET_ACCESS_KEY: minio123 +kind: Secret +metadata: + name: minio-secret diff --git a/manifests/minio-tf-workspace.yaml b/manifests/minio-tf-workspace.yaml new file mode 100644 index 0000000..50e14e7 --- /dev/null +++ b/manifests/minio-tf-workspace.yaml @@ -0,0 +1,164 @@ +apiVersion: tf.upbound.io/v1beta1 +kind: ProviderConfig +metadata: + name: minio +spec: + configuration: | + provider minio { + // required + minio_server = "s3-new.badhouseplants.net:443" + minio_region = "us-east-1" + minio_ssl = "true" + } + + terraform { + backend "kubernetes" { + secret_suffix = "minio-tf-state" + namespace = "platform" + in_cluster_config = true + } + required_providers { + minio = { + source = "aminueza/minio" + version = "2.4.3" + } + } + } +--- +apiVersion: tf.upbound.io/v1beta1 +kind: Workspace +metadata: + name: example-bucket-creation +spec: + providerConfigRef: + name: minio + writeConnectionSecretToRef: + namespace: platform + name: tf-minio-state-output + forProvider: + source: Inline + env: + - name: MINIO_PASSWORD + secretKeyRef: + namespace: platform + name: minio-secret + key: AWS_SECRET_ACCESS_KEY + - name: MINIO_USER + secretKeyRef: + namespace: platform + name: minio-secret + key: AWS_ACCESS_KEY_ID + module: | + resource "minio_s3_bucket" "states" { + bucket = "states" + } + + resource "minio_iam_user" "terraform" { + name = "terraform" + force_destroy = true + tags = { + service = "terraform" + } + } + resource "minio_iam_policy" "terraform" { + name = "state-terraform" + policy= <