diff --git a/kubernetes/infrastructure/kustomization.yaml b/kubernetes/infrastructure/kustomization.yaml index 2ff9d72..4119841 100644 --- a/kubernetes/infrastructure/kustomization.yaml +++ b/kubernetes/infrastructure/kustomization.yaml @@ -1,8 +1,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ./namespaces/namespaces.yaml - - ./repositories/repositories.yaml -# - ./cilium/cilium.yaml - - ./ingress-nginx/ingress-nginx-config.yaml + # - ./cilium/cilium.yaml + - ./minio/minio.yaml - ./ingress-nginx/ingress-nginx.yaml + - ./ingress-nginx/ingress-nginx-config.yaml + - ./namespaces/namespaces.yaml + - ./repositories/repositories.yaml \ No newline at end of file diff --git a/kubernetes/infrastructure/minio/app/release.yaml b/kubernetes/infrastructure/minio/app/release.yaml new file mode 100644 index 0000000..36e90d7 --- /dev/null +++ b/kubernetes/infrastructure/minio/app/release.yaml @@ -0,0 +1,38 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: minio + namespace: minio +spec: + releaseName: minio + chart: + spec: + chart: minio + sourceRef: + kind: HelmRepository + name: bitnami + namespace: flux-system + interval: 1h + install: + remediation: + retries: 3 + values: + clusterDomain: minio.cluster.edward.sydney + auth: + rootUser: ${root_user} + rootPassword: ${root_password} + containerPorts: + api: 9000 + console: 9001 + nodeSelector: + kubernetes.io/hostname: rpi5-cluster-node-3 + service: + type: ClusterIP + ports: + api: 9000 + console: 9001 + nodePorts: + api: 19000 + console: 19001 + persistence: + existingClaim: "minio-pvc" diff --git a/kubernetes/infrastructure/minio/app/volume.yaml b/kubernetes/infrastructure/minio/app/volume.yaml new file mode 100644 index 0000000..a2b5259 --- /dev/null +++ b/kubernetes/infrastructure/minio/app/volume.yaml @@ -0,0 +1,46 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: minio-pv + namespace: minio + labels: + type: local +spec: + storageClassName: local-path + volumeMode: Filesystem + capacity: + storage: 256Gi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + local: + path: "/mnt/nfs/AppData/minio" + claimRef: + apiVersion: v1 + kind: PersistentVolumeClaim + name: minio-pvc + namespace: minio + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - rpi5-cluster-node-3 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: minio-pvc + namespace: minio + labels: + name: minio-pvc +spec: + storageClassName: local-path + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 256Gi \ No newline at end of file diff --git a/kubernetes/infrastructure/minio/minio.yaml b/kubernetes/infrastructure/minio/minio.yaml new file mode 100644 index 0000000..a02880d --- /dev/null +++ b/kubernetes/infrastructure/minio/minio.yaml @@ -0,0 +1,48 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: minio-secrets + namespace: flux-system +spec: + interval: 10m + timeout: 1m30s + retryInterval: 30s + targetNamespace: minio + path: ./minio + prune: true + sourceRef: + kind: GitRepository + namespace: flux-system + name: home-cluster-ops-secrets + dependsOn: + - name: repositories + namespace: flux-system + decryption: + provider: sops + secretRef: + name: sops-age +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: minio + namespace: flux-system +spec: + interval: 10m + timeout: 1m30s + retryInterval: 30s + path: ./kubernetes/apps/minio/app + prune: true + sourceRef: + kind: GitRepository + namespace: flux-system + name: flux-system + dependsOn: + - name: namespaces + namespace: flux-system + - name: minio-secrets + namespace: flux-system + postBuild: + substituteFrom: + - kind: Secret + name: minio-secrets \ No newline at end of file diff --git a/kubernetes/infrastructure/namespaces/namespaces/minio.yaml b/kubernetes/infrastructure/namespaces/namespaces/minio.yaml new file mode 100644 index 0000000..428108a --- /dev/null +++ b/kubernetes/infrastructure/namespaces/namespaces/minio.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: minio \ No newline at end of file