diff --git a/Makefile b/Makefile index dcfd930f..f1ce212a 100644 --- a/Makefile +++ b/Makefile @@ -1,61 +1,93 @@ -CHART_DIR_PATH_ARGO=charts/init -ARGO_NAMESPACE=argocd +CHART_DIR_PATH_ARGO="charts/init" +ARGO_NAMESPACE="argocd" ACD=argo-cd -FORWARD_PORT="8080" +ACD_VERSION=5.43.3 +REGISTRY="registry.gitlab.com" +FORWARD_PORT="8021" +MINIKUBE_KUBE_VERSION=1.27.4 +REGCRED_NAME="regcred" +DEEPCYOHER_NAMESPACE=deepcypher +# additional args for setting podman auth.json config +# https://docs.podman.io/en/latest/markdown/podman-login.1.html +DOCKER_AUTH_FILE="${HOME}/.docker/config.json" +REGISTRY_AUTH_FILE="${HOME}/.podman/auth.json" +# this will override the charts values.yaml to let the chart know it should either run in "cloud" or "metal" mode. +# The only difference should be storage and loadbalancing since on bare-metal we have to do it ourselves. +KUBE_TYPE=metal + +# Cloudflared settings +CLUSTER_NAME=arbiter +CLOUDFLARED_TUNNEL_CRED_FILE="${HOME}/.cloudflared/${CLUSTER_NAME}.yaml" + +.PHONY: help +help: ## display this auto generated help message + @echo "Please provide a make target:" + @grep -F -h "##" $(MAKEFILE_LIST) | grep -F -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' .PHONY: all -all: minikube install +all: minikube install forward ## create a basic minikube cluster to launch the stack onto .PHONY: install -install: - # pre-installing argocd-workflows chart to get necessary argocd CRDs - # https://github.com/argoproj/argo-helm/issues/1447 +install: #login.lock ## bootstrap cluster into default kubeconfig location helm repo add argocd https://argoproj.github.io/argo-helm/ - helm install --create-namespace --namespace ${ARGO_NAMESPACE} --set="dex.enabled=false" ${ACD} argocd/argo-cd helm dependency update ${CHART_DIR_PATH_ARGO} - helm install --create-namespace --namespace ${ARGO_NAMESPACE} init ${CHART_DIR_PATH_ARGO} + #kubectl create namespace ${DEEPCYOHER_NAMESPACE} && kubectl apply -f login.creds + helm upgrade --install --create-namespace --namespace ${ARGO_NAMESPACE} -f argocd-values.yaml ${ACD} argocd/argo-cd --version ${ACD_VERSION} + helm upgrade --install --create-namespace --namespace ${ARGO_NAMESPACE} --set="type=${KUBE_TYPE}" init ${CHART_DIR_PATH_ARGO} .PHONY: forward -forward: +forward: ## forward local port to argocd server deployment for secure preview kubectl wait --timeout=600s --for=condition=Available=True -n ${ARGO_NAMESPACE} deployment ${ACD}-argocd-server kubectl -n ${ARGO_NAMESPACE} get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d && echo xdg-open "https://localhost:${FORWARD_PORT}?username=admin?password=" & kubectl port-forward svc/${ACD}-argocd-server -n ${ARGO_NAMESPACE} ${FORWARD_PORT}:443 +.PHONY: proxy +proxy: ## creare some minikube proxy and a socat forward to proxy traffic over 443 + minikube -n ingress service ingress-ingress-nginx-controller --url + # please set auth.deepcypher.me, deepcypher.me, docs.deepcypher.me api.deepcypher.me to the TCP ip redirected after this message + sudo socat TCP-LISTEN:443,fork TCP:192.168.49.2:30443 + .PHONY: uninstall -uninstall: +uninstall: ## uninstall this bootstrap but this will not remove argocd as it needs to reconcile helm uninstall --namespace ${ARGO_NAMESPACE} init - helm uninstall --namespace ${ARGO_NAMESPACE} ${ACD} .PHONY: upgrade -upgrade: - helm upgrade --namespace ${ARGO_NAMESPACE} init ${CHART_DIR_PATH_ARGO} +upgrade: ## upgrade both argocd and the bootstrap + helm upgrade --namespace ${ARGO_NAMESPACE} -f argo-values.yaml ${ACD} argocd/argo-cd --version ${ACD_VERSION} + helm upgrade --namespace ${ARGO_NAMESPACE} --set="type=${KUBE_TYPE}" init ${CHART_DIR_PATH_ARGO} -.PHONY: template -template: - helm template --set namespace.name=${ARGO_NAMESPACE} --set namespace.create=true ${CHART_DIR_PATH_ARGO}/. > spec.yaml - less spec.yaml +.PHONY: login +login: login.lock + +login.lock: + podman login ${REGISTRY} + kubectl create -n ${DEEPCYOHER_NAMESPACE} secret generic ${REGCRED_NAME} --from-file=.dockerconfigjson=${REGISTRY_AUTH_FILE} --type=kubernetes.io/dockerconfigjson --dry-run=client -o yaml > login.creds + touch login.lock + +.PHONY: patch-regcred +patch-regcred: login.lock + kubectl apply -f login.creds .PHONY: minikube -minikube: +minikube: ## create a minikube cluster by first deleting minikube then creating a new one with calico etc minikube delete - minikube start --kubernetes-version=v1.25.2 + minikube start --cni calico --driver=podman --kubernetes-version=${MINIKUBE_KUBE_VERSION} # minikube addons enable ingress + # OR forward URL and edit /etc/hosts to point to 127.0.0.1 + # minikube -n ingress service ingress-ingress-nginx-controller --url + # sudo socat TCP-LISTEN:443,fork TCP::30443 -.PHONY: perm -perm: - sudo usermod -aG docker ${USER} - -.PHONY: unperm -unperm: - sudo gpasswd -d ${USER} docker - -.PHONY: clean -clean: - rm -f login.lock login.creds - docker logout ${REGISTRY} - minikube delete +# THIS IS VERY IMPORTANT PLEASE FOR THE LOVE OF GOD BACK THIS UP +# You need this master key to be able to decrypt your secrets in the cluster in future +master.key: + kubectl -n sealed-secrets get secret -l sealedsecrets.bitnami.com/sealed-secrets-key -o yaml > master.key .PHONY: stuck -stuck: +stuck: ## find stuck resources in argocd namespace kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found -n ${ARGO_NAMESPACE} + +.PHONY: argotunnel +argotunnel: master.key ## Generate encrypted cloudflared argo tunnel for this cluster + cloudflared tunnel create metal --output yaml --credentials-file ${CLOUDFLARED_TUNNEL_CRED_FILE} + kubectl create secret generic tunnel-credentials --from-file=credentials.json=${CLOUDFLARED_TUNNEL_CRED_FILE} --dry-run=client -o yaml > ${CLUSTER_NAME}.cloudflared.yaml diff --git a/argocd-values.yaml b/argocd-values.yaml new file mode 100644 index 00000000..dab2f440 --- /dev/null +++ b/argocd-values.yaml @@ -0,0 +1,21 @@ +redis-ha: + enabled: true + +controller: + replicas: 3 + +server: + autoscaling: + enabled: true + minReplicas: 2 + +repoServer: + autoscaling: + enabled: true + minReplicas: 2 + +applicationSet: + replicaCount: 2 + +dex: + enabled: false diff --git a/charts/aoa/templates/dc.yaml b/charts/aoa/templates/dc.yaml index 62268543..e8138964 100644 --- a/charts/aoa/templates/dc.yaml +++ b/charts/aoa/templates/dc.yaml @@ -1,7 +1,3 @@ -# @Author: George Onoufriou -# @Date: 2021-11-26T16:13:56+00:00 -# @Last modified by: archer -# @Last modified time: 2021-11-26T16:33:43+00:00 apiVersion: argoproj.io/v1alpha1 kind: Application metadata: diff --git a/charts/aoa/templates/exp-mongodb-app.yaml b/charts/aoa/templates/exp-mongodb-app.yaml index 900f1f82..82366322 100644 --- a/charts/aoa/templates/exp-mongodb-app.yaml +++ b/charts/aoa/templates/exp-mongodb-app.yaml @@ -1,35 +1,30 @@ -# @Author: George Onoufriou -# @Date: 2021-11-26T16:56:36+00:00 -# @Last modified by: archer -# @Last modified time: 2021-12-10T13:00:50+00:00 - -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: exp-mongodb-app - namespace: argocd - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - destination: - name: '' - namespace: exp-mongodb - server: 'https://kubernetes.default.svc' - source: - path: charts/experimental-mongodb - repoURL: 'https://gitlab.com/deepcypher/dc-kc.git' - targetRevision: HEAD - helm: - values: |- - exmongo: - persistence: - size: {{ .Values.exmongo.persistence.size }} - tls: - mode: preferTLS - project: default - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true +#apiVersion: argoproj.io/v1alpha1 +#kind: Application +#metadata: +# name: exp-mongodb-app +# namespace: argocd +# finalizers: +# - resources-finalizer.argocd.argoproj.io +#spec: +# destination: +# name: '' +# namespace: exp-mongodb +# server: 'https://kubernetes.default.svc' +# source: +# path: charts/experimental-mongodb +# repoURL: 'https://gitlab.com/deepcypher/dc-kc.git' +# targetRevision: HEAD +# helm: +# values: |- +# exmongo: +# persistence: +# size: {{ .Values.exmongo.persistence.size }} +# tls: +# mode: preferTLS +# project: default +# syncPolicy: +# automated: +# prune: true +# selfHeal: true +# syncOptions: +# - CreateNamespace=true diff --git a/charts/aoa/templates/jellyfin-app.yaml b/charts/aoa/templates/jellyfin-app.yaml index 6c43a157..72042f22 100644 --- a/charts/aoa/templates/jellyfin-app.yaml +++ b/charts/aoa/templates/jellyfin-app.yaml @@ -1,46 +1,46 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: jellyfin-app - namespace: argocd - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - destination: - name: '' - namespace: jellyfin - server: 'https://kubernetes.default.svc' - source: - path: jellyfin - repoURL: 'https://gitlab.com/deepcypher/jellyfin-helm.git' - targetRevision: {{ .Values.jellyfinHelm.branch | default .Values.global.branch | quote}} - helm: - values: |- - persist: {{ .Values.jellyfinHelm.persist }} - ingress: - enable: {{ .Values.jellyfinHelm.ingress.enable }} - pvc: - - name: jellyfin-media-pvc - mount: /data/media - storageClassName: {{ .Values.jellyfinHelm.mediaClass }} - volumeName: jellyfin-media-pv - readOnly: True - size: {{ .Values.jellyfinHelm.mediaSize }} - accessModes: - - ReadOnlyMany - - name: jellyfin-config-pvc - mount: /config - storageClassName: {{ .Values.jellyfinHelm.configClass }} - volumeName: jellyfin-config-pv - readOnly: False - size: {{ .Values.jellyfinHelm.configSize }} - accessModes: - - ReadWriteOnce - project: default - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true - +#apiVersion: argoproj.io/v1alpha1 +#kind: Application +#metadata: +# name: jellyfin-app +# namespace: argocd +# finalizers: +# - resources-finalizer.argocd.argoproj.io +#spec: +# destination: +# name: '' +# namespace: jellyfin +# server: 'https://kubernetes.default.svc' +# source: +# path: jellyfin +# repoURL: 'https://gitlab.com/deepcypher/jellyfin-helm.git' +# targetRevision: {{ .Values.jellyfinHelm.branch | default .Values.global.branch | quote}} +# helm: +# values: |- +# persist: {{ .Values.jellyfinHelm.persist }} +# ingress: +# enable: {{ .Values.jellyfinHelm.ingress.enable }} +# pvc: +# - name: jellyfin-media-pvc +# mount: /data/media +# storageClassName: {{ .Values.jellyfinHelm.mediaClass }} +# volumeName: jellyfin-media-pv +# readOnly: True +# size: {{ .Values.jellyfinHelm.mediaSize }} +# accessModes: +# - ReadOnlyMany +# - name: jellyfin-config-pvc +# mount: /config +# storageClassName: {{ .Values.jellyfinHelm.configClass }} +# volumeName: jellyfin-config-pv +# readOnly: False +# size: {{ .Values.jellyfinHelm.configSize }} +# accessModes: +# - ReadWriteOnce +# project: default +# syncPolicy: +# automated: +# prune: true +# selfHeal: true +# syncOptions: +# - CreateNamespace=true +# diff --git a/charts/aoa/templates/nextcloud.yaml b/charts/aoa/templates/nextcloud.yaml index 94d193ee..56454c86 100644 --- a/charts/aoa/templates/nextcloud.yaml +++ b/charts/aoa/templates/nextcloud.yaml @@ -1,28 +1,23 @@ -# @Author: George Onoufriou -# @Date: 2021-11-26T16:56:36+00:00 -# @Last modified by: archer -# @Last modified time: 2021-11-26T17:25:47+00:00 - -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: nextcloud-app - namespace: argocd - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - destination: - name: '' - namespace: nextcloud - server: 'https://kubernetes.default.svc' - source: - path: charts/dc-nextcloud - repoURL: 'https://gitlab.com/deepcypher/dc-kc.git' - targetRevision: HEAD - project: default - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true +#apiVersion: argoproj.io/v1alpha1 +#kind: Application +#metadata: +# name: nextcloud-app +# namespace: argocd +# finalizers: +# - resources-finalizer.argocd.argoproj.io +#spec: +# destination: +# name: '' +# namespace: nextcloud +# server: 'https://kubernetes.default.svc' +# source: +# path: charts/dc-nextcloud +# repoURL: 'https://gitlab.com/deepcypher/dc-kc.git' +# targetRevision: HEAD +# project: default +# syncPolicy: +# automated: +# prune: true +# selfHeal: true +# syncOptions: +# - CreateNamespace=true diff --git a/charts/cert-pki/.helmignore b/charts/cert-manager/.helmignore similarity index 100% rename from charts/cert-pki/.helmignore rename to charts/cert-manager/.helmignore diff --git a/charts/cert-pki/Chart.yaml b/charts/cert-manager/Chart.yaml similarity index 92% rename from charts/cert-pki/Chart.yaml rename to charts/cert-manager/Chart.yaml index 2e487324..bb4ec4fc 100644 --- a/charts/cert-pki/Chart.yaml +++ b/charts/cert-manager/Chart.yaml @@ -30,7 +30,7 @@ version: 0.1.0 # It is recommended to use it with quotes. appVersion: "0.1.0" -# dependencies: -# - name: cert-manager -# version: "v1.7.2" -# repository: "https://charts.jetstack.io" +dependencies: +- name: cert-manager + version: "v1.12.2" + repository: "https://charts.jetstack.io" diff --git a/charts/cert-pki/templates/cluster-acme-issuer.yaml b/charts/cert-manager/templates/cluster-acme-issuer.yaml similarity index 100% rename from charts/cert-pki/templates/cluster-acme-issuer.yaml rename to charts/cert-manager/templates/cluster-acme-issuer.yaml diff --git a/charts/cert-pki/templates/cluster-auxiliary-issuer.yaml b/charts/cert-manager/templates/cluster-auxiliary-issuer.yaml similarity index 100% rename from charts/cert-pki/templates/cluster-auxiliary-issuer.yaml rename to charts/cert-manager/templates/cluster-auxiliary-issuer.yaml diff --git a/charts/cert-pki/values.yaml b/charts/cert-manager/values.yaml similarity index 100% rename from charts/cert-pki/values.yaml rename to charts/cert-manager/values.yaml diff --git a/charts/dc-template/Chart.yaml b/charts/dc-template/Chart.yaml deleted file mode 100644 index c139ecb8..00000000 --- a/charts/dc-template/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: dc-template -description: DeepCypher AoA template cluster decleration - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "0.1.0" diff --git a/charts/infra-metallb/.helmignore b/charts/infra-metallb/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/charts/infra-metallb/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/infra-metallb/templates/ipAddressPool.yaml b/charts/infra-metallb/templates/ipAddressPool.yaml deleted file mode 100644 index 1ea53a76..00000000 --- a/charts/infra-metallb/templates/ipAddressPool.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- /* -# Metallb IP Address Pool Custom Resource -# https://metallb.universe.tf/concepts/layer2/ -# https://metallb.universe.tf/configuration/ -# Purpose: -# - Tell metallb what pool of IPs it can use in L2 Mode -# - Allow for easy reconfiguration with helm variables -# - Optional; does not force user into using anything in particular -*/}} - -{{- if and .Values.metallb.enable .Values.metallb.l2.enable }} -apiVersion: metallb.io/v1beta1 -kind: IPAddressPool -metadata: - name: {{ .Values.metallb.l2.pool.name }} - namespace: {{ .Values.metallb.namespace }} -spec: - addresses: - {{- range .Values.metallb.l2.pool.addresses }} - - {{ . }} - {{- end }} -{{- end }} diff --git a/charts/infra-metallb/templates/l2Advertisement.yaml b/charts/infra-metallb/templates/l2Advertisement.yaml deleted file mode 100644 index 58771964..00000000 --- a/charts/infra-metallb/templates/l2Advertisement.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- /* -# Metallb L2 Advertisement Custom Resource -# https://metallb.universe.tf/concepts/layer2/ -# https://metallb.universe.tf/configuration/ -# Purpose: -# - Tell metallb what pool of IPs it can use in L2 Mode -# - Allow for easy reconfiguration with helm variables -# - Optional; does not force user into using anything in particular -*/}} - -{{- if and .Values.metallb.enable .Values.metallb.l2.enable }} -apiVersion: metallb.io/v1beta1 -kind: L2Advertisement -metadata: - name: {{ .Values.metallb.l2.config.name }} - namespace: {{ .Values.metallb.namespace }} -spec: - ipAddressPools: - - {{ .Values.metallb.l2.pool.name }} -{{- end }} diff --git a/charts/infra-metallb/values.yaml b/charts/infra-metallb/values.yaml deleted file mode 100644 index 5be1826a..00000000 --- a/charts/infra-metallb/values.yaml +++ /dev/null @@ -1,17 +0,0 @@ -global: - -metallb: - namespace: metallb-system - enable: true - l2: - config: - name: metallb-l2-config - # whether to enable level 2 mode in metallb - enable: false - pool: - name: metallb-default-pool - # what addresses pr address ranges to use for the ARP requests - # this is a list so put in as many as desired - # please also eliminate the square brackets when you do as placeholding - addresses: [] - # - 192.168.4.240-192.168.4.250 diff --git a/charts/infrastructure/templates/aoa.yaml b/charts/infrastructure/templates/aoa.yaml index fabb0647..dd878f4c 100644 --- a/charts/infrastructure/templates/aoa.yaml +++ b/charts/infrastructure/templates/aoa.yaml @@ -1,7 +1,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - name: aoa + name: apps namespace: argocd finalizers: - resources-finalizer.argocd.argoproj.io diff --git a/charts/infrastructure/templates/cert-manager.yaml b/charts/infrastructure/templates/cert-manager.yaml index 156d3084..aaa77deb 100644 --- a/charts/infrastructure/templates/cert-manager.yaml +++ b/charts/infrastructure/templates/cert-manager.yaml @@ -12,13 +12,11 @@ spec: server: 'https://kubernetes.default.svc' source: path: '' - repoURL: 'https://charts.jetstack.io' - targetRevision: v1.9.1 + repoURL: 'https://kubernetes.github.io/ingress-nginx' + targetRevision: 4.3.0 chart: cert-manager - helm: - parameters: - - name: installCRDs - value: 'true' + #helm: + # values: | project: default syncPolicy: automated: diff --git a/charts/infrastructure/templates/cert-pki.yaml b/charts/infrastructure/templates/cert-pki.yaml deleted file mode 100644 index ccc09086..00000000 --- a/charts/infrastructure/templates/cert-pki.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: cert-pki - namespace: argocd - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - destination: - name: '' - namespace: certs - server: 'https://kubernetes.default.svc' - source: - path: charts/cert-pki - repoURL: 'https://gitlab.com/deepcypher/dc-kc.git' - targetRevision: {{ .Values.certPKI.branch | default .Values.global.branch | quote}} - project: default - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true diff --git a/charts/infrastructure/templates/ingress-nginx.yaml b/charts/infrastructure/templates/ingress-nginx.yaml index 1712ae8c..32c3f362 100644 --- a/charts/infrastructure/templates/ingress-nginx.yaml +++ b/charts/infrastructure/templates/ingress-nginx.yaml @@ -20,7 +20,8 @@ spec: values: | controller: service: - type: NodePort + externalTrafficPolicy: "Local" + #type: NodePort nodePorts: http: 30080 https: 30443 @@ -28,16 +29,6 @@ spec: enabled: true minReplicas: 3 maxReplicas: 5 - # # These are the old values from bitnami ingress-nginx - # service: - # type: NodePort - # nodePorts: - # http: 30080 - # https: 30443 - # autoscaling: - # enabled: true - # minReplicas: 3 - # maxReplicas: 5 project: default syncPolicy: automated: diff --git a/charts/infrastructure/templates/metallb-config.yaml b/charts/infrastructure/templates/metallb-config.yaml deleted file mode 100644 index 619c05f2..00000000 --- a/charts/infrastructure/templates/metallb-config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: metallb-config - namespace: argocd - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - destination: - name: '' - namespace: metallb-system - server: 'https://kubernetes.default.svc' - source: - path: charts/infra-metallb - repoURL: 'https://gitlab.com/deepcypher/dc-kc.git' - targetRevision: {{ .Values.metallb.branch | default .Values.global.branch | quote}} - helm: - values: |- - metallb: - namespace: metallb-system - enable: true - l2: - config: - name: metallb-l2-config - # whether to enable level 2 mode in metallb - enable: true - pool: - name: metallb-default-pool - # what addresses pr address ranges to use for the ARP requests - # this is a list so put in as many as desired - # please also eliminate the square brackets when you do as placeholding - addresses: - - 192.168.4.240-192.168.4.250 - project: default - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true diff --git a/charts/infrastructure/templates/metallb.yaml b/charts/infrastructure/templates/metallb.yaml index db02c84b..aa214f6b 100644 --- a/charts/infrastructure/templates/metallb.yaml +++ b/charts/infrastructure/templates/metallb.yaml @@ -1,7 +1,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - name: metallb + name: apps namespace: argocd finalizers: - resources-finalizer.argocd.argoproj.io @@ -11,10 +11,13 @@ spec: namespace: metallb-system server: 'https://kubernetes.default.svc' source: - path: '' - repoURL: 'https://metallb.github.io/metallb' - targetRevision: 0.13.5 - chart: metallb + path: charts/metallb + repoURL: 'https://gitlab.com/deepcypher/dc-kc.git' + targetRevision: HEAD + helm: + values: |- + global: + branch: HEAD project: default syncPolicy: automated: diff --git a/charts/init/templates/argocd-watch.yaml b/charts/init/templates/argocd-watch.yaml deleted file mode 100644 index 74bde790..00000000 --- a/charts/init/templates/argocd-watch.yaml +++ /dev/null @@ -1,30 +0,0 @@ -#apiVersion: argoproj.io/v1alpha1 -#kind: Application -#metadata: -# # name: argo-cd-argocd -# name: argocd -# namespace: argocd -# finalizers: -# - resources-finalizer.argocd.argoproj.io -#spec: -# destination: -# name: '' -# namespace: argocd -# server: 'https://kubernetes.default.svc' -# source: -# path: '' -# repoURL: 'https://argoproj.github.io/argo-helm/' -# targetRevision: 5.5.6 -# chart: argo-cd -# helm: -# values: |- -# installCRDs: true -# dex: -# enabled: false -# project: default -# syncPolicy: -# automated: -# prune: true -# selfHeal: true -# syncOptions: -# - CreateNamespace=true diff --git a/charts/dc-template/.helmignore b/charts/metallb/.helmignore similarity index 100% rename from charts/dc-template/.helmignore rename to charts/metallb/.helmignore diff --git a/charts/infra-metallb/Chart.yaml b/charts/metallb/Chart.yaml similarity index 90% rename from charts/infra-metallb/Chart.yaml rename to charts/metallb/Chart.yaml index 1781b122..c56f3421 100644 --- a/charts/infra-metallb/Chart.yaml +++ b/charts/metallb/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: infra-metallb +name: metallb description: A Helm chart for Kubernetes # A chart can be either an 'application' or a 'library' chart. @@ -22,3 +22,9 @@ version: 0.1.0 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. appVersion: "1.16.0" + + +dependencies: +- name: metallb + version: 0.13.10 + repository: "https://metallb.github.io/metallb" diff --git a/charts/metallb/templates/ipAddressPool.yaml b/charts/metallb/templates/ipAddressPool.yaml new file mode 100644 index 00000000..a30c64ad --- /dev/null +++ b/charts/metallb/templates/ipAddressPool.yaml @@ -0,0 +1,8 @@ +apiVersion: metallb.io/v1beta1 +kind: IPAddressPool +metadata: + name: service-pool + namespace: metallb-system +spec: + addresses: + - 192.168.10.250/32 diff --git a/charts/metallb/templates/l2Advertisement.yaml b/charts/metallb/templates/l2Advertisement.yaml new file mode 100644 index 00000000..29d46324 --- /dev/null +++ b/charts/metallb/templates/l2Advertisement.yaml @@ -0,0 +1,8 @@ +apiVersion: metallb.io/v1beta1 +kind: L2Advertisement +metadata: + name: arp + namespace: metallb-system +spec: + ipAddressPools: + - service-pool diff --git a/charts/dc-template/values.yaml b/charts/metallb/values.yaml similarity index 100% rename from charts/dc-template/values.yaml rename to charts/metallb/values.yaml