Skip to content

Commit

Permalink
feat(argocd)!: use helm subchart pattern (#57)
Browse files Browse the repository at this point in the history
* feat(argocd): use helm subchart pattern

Signed-off-by: Nguyen Marc <[email protected]>

* docs(argocd):  use the subchart approach for helm apps

Signed-off-by: Nguyen Marc <[email protected]>

* docs(argocd): fixed outdated details

Signed-off-by: Nguyen Marc <[email protected]>

* fix(argocd): subchart must be called explicitly

Signed-off-by: Nguyen Marc <[email protected]>
  • Loading branch information
Darkness4 authored Jul 4, 2022
1 parent f1a85b6 commit 313b43e
Show file tree
Hide file tree
Showing 28 changed files with 1,534 additions and 1,280 deletions.
4 changes: 2 additions & 2 deletions .ci/check-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ sed -Ei "s/targetRevision: .*\$/targetRevision: ${local_path_provisioner_version

kube_prometheus_stack_version=$(curl -fsSL https://prometheus-community.github.io/helm-charts/index.yaml | yq '.entries.kube-prometheus-stack.[0].version')
sed -Ei "s/kube_prometheus_stack_version=.*\$/kube_prometheus_stack_version=${kube_prometheus_stack_version}/g" "$script_path/version-lock"
sed -Ei "s/targetRevision: .*\$/targetRevision: ${kube_prometheus_stack_version}/g" "$project_path/argo.example/monitoring/apps/prometheus-app.yml"
sed -Ei "s/version: .*\$/version: ${kube_prometheus_stack_version}/g" "$project_path/helm-subcharts/kube-prometheus-stack/Chart.yaml"
sed -Ei "s/targetRevision: .*\$/targetRevision: kube-prometheus-stack-${kube_prometheus_stack_version}/g" "$project_path/argo.example/monitoring/apps/prometheus-crd-app.yml"
sed -Ei "s/version: .*\$/version: ${kube_prometheus_stack_version}/g" "$project_path/web/docs/getting-started/05-argo-apps-deployment.md"
sed -Ei "s/targetRevision: kube-prometheus-stack-.*\$/targetRevision: kube-prometheus-stack-${kube_prometheus_stack_version}/g" "$project_path/web/docs/getting-started/05-argo-apps-deployment.md"
sed -Ei "s/targetRevision: [0-9].*\$/targetRevision: ${kube_prometheus_stack_version}/g" "$project_path/web/docs/getting-started/05-argo-apps-deployment.md"

# cfctl.yaml
k0s_version=$(curl -H "Authorization: token ${TOKEN}" -fsSL https://api.github.com/repos/k0sproject/k0s/releases/latest | jq -r '.tag_name' | tr -d 'v')
Expand Down
48 changes: 5 additions & 43 deletions argo.example/cvmfs/apps/cvmfs-server-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,17 @@ metadata:
spec:
project: cvmfs
source:
# You should have forked this repo. Change the URL to your fork.
repoURL: [email protected]:squarefactory/ClusterFactory-CE.git
targetRevision: HEAD
path: helm/cvmfs-server
helm:
releaseName: cvmfs-server

values: |
replicas: 1
dnsPolicy: "None"
dnsConfig:
nameservers:
- 10.96.0.10
searches:
- slurm-cluster.svc.cluster.local
- example.com
options:
- name: ndots
value: "0"
nodeSelector:
kubernetes.io/hostname: mn1.example.com
topology.kubernetes.io/region: ch-sion
topology.kubernetes.io/zone: ch-sion-1
config:
replicas:
- name: stdenv.sion.csquare.run
url: http://cvmfs.ch1.deepsquare.run/cvmfs/stdenv.sion.csquare.run
keys: /etc/cvmfs/keys/sion.csquare.run
options: '-o root'
volumeMounts:
- name: sion-csquare-run-keys
mountPath: /etc/cvmfs/keys/sion.csquare.run/stdenv.sion.csquare.run.pub
subPath: stdenv.sion.csquare.run.pub
readOnly: true
volumes:
- name: sion-csquare-run-keys
secret:
secretName: sion-csquare-run-keys-secret
defaultMode: 256
state:
storageClassName: 'local-path'
storage:
storageClassName: 'local-path'
# Create a values file inside your fork and change the values.
valueFiles:
[]
# - values-example.yaml

destination:
server: 'https://kubernetes.default.svc'
Expand Down
37 changes: 5 additions & 32 deletions argo.example/cvmfs/apps/cvmfs-service-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,17 @@ metadata:
spec:
project: cvmfs
source:
# You should have forked this repo. Change the URL to your fork.
repoURL: [email protected]:squarefactory/ClusterFactory-CE.git
targetRevision: HEAD
path: helm/cvmfs-service
helm:
releaseName: cvmfs-service

values: |
dnsPolicy: "None"
dnsConfig:
nameservers:
- 10.96.0.10
searches:
- ch1.example.com
options:
- name: ndots
value: "0"
repositories:
- name: software-sion-csquare-run
repository: software.sion.csquare.run
- name: unpacked-sion-csquare-run
repository: unpacked.sion.csquare.run
- name: stdenv-sion-csquare-run
repository: stdenv.sion.csquare.run
configs:
default.local:
mountPath: default.local
contents: |
CVMFS_QUOTA_LIMIT=-1
CVMFS_USE_GEOAPI=no
CVMFS_HTTP_PROXY="DIRECT"
CVMFS_KEYS_DIR="/etc/cvmfs/keys"
CVMFS_SERVER_URL="http://cvmfs.ch1.deepsquare.run/cvmfs/@fqrn@"
CVMFS_USER=root
keys:
secretName: 'sion-csquare-run-keys-secret'
# Create a values file inside your fork and change the values.
valueFiles:
[]
# - values-example.yaml

destination:
server: 'https://kubernetes.default.svc'
Expand Down
55 changes: 8 additions & 47 deletions argo.example/cvmfs/apps/squid-proxy-app.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cvmfs-service-app
name: squid-proxy-app
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: cvmfs
source:
repoURL: https://gitlab.cern.ch/helm/charts/cern.git
# You should have forked this repo. Change the URL to your fork.
repoURL: [email protected]:squarefactory/ClusterFactory-CE.git
targetRevision: HEAD
path: squid
path: helm-subcharts/squid
helm:
releaseName: cvmfs-service
releaseName: squid-proxy

values: |
image:
repository: datadog/squid
tag: latest
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 3128
annotations: null
ingress:
enabled: false
annotations: {}
paths:
- /
hosts: []
tls: []
config:
- 'acl local_nodes src YOUR_CLIENT_IPS'
- 'acl stratum_ones dst cvmfs.ch1.deepsquare.run'
- 'http_port 3128'
- 'http_access allow stratum_ones'
- 'http_access allow local_nodes'
- 'http_access allow localhost'
- 'http_access deny all'
- 'collapsed_forwarding on'
- 'minimum_expiry_time 0'
- 'maximum_object_size 1024 MB'
- 'cache_mem 128 MB'
- 'maximum_object_size_in_memory 128 KB'
- 'cache_dir ufs /var/spool/squid 50000 16 256'
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
# If the values file is not `values.yaml`:
# valueFiles:
# - values-example.yaml

destination:
server: 'https://kubernetes.default.svc'
Expand Down
29 changes: 5 additions & 24 deletions argo.example/ldap/apps/openldap-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,17 @@ metadata:
spec:
project: ldap
source:
# You should have forked this repo. Change the URL to your fork.
repoURL: [email protected]:squarefactory/ClusterFactory-CE.git
targetRevision: HEAD
path: helm/openldap
helm:
releaseName: openldap

values: |
replicas: 1
nodeSelector:
topology.kubernetes.io/region: ch-sion
topology.kubernetes.io/zone: ch-sion-1
env:
BITNAMI_DEBUG: 'true'
LDAP_ROOT: 'dc=example,dc=org'
LDAP_CONFIG_ADMIN_ENABLED: 'no'
LDAP_USER_DC: 'users'
LDAP_GROUP: 'readers'
LDAP_ADD_SCHEMAS: 'yes'
LDAP_EXTRA_SCHEMAS: 'cosine,inetorgperson,nis'
LDAP_SKIP_DEFAULT_TREE: 'no'
LDAP_CUSTOM_LDIF_DIR: '/ldifs'
LDAP_CUSTOM_SCHEMA_FILE: '/schema/custom.ldif'
LDAP_ULIMIT_NOFILES: '1024'
LDAP_ALLOW_ANON_BINDING: 'yes'
LDAP_LOGLEVEL: '256'
persistence:
storageClassName: 'openldap-nfs'
# Create a values file inside your fork and change the values.
valueFiles:
[]
# - values-example.yaml

destination:
server: 'https://kubernetes.default.svc'
Expand Down
Loading

0 comments on commit 313b43e

Please sign in to comment.