From d82225d2d8aa471d6386af2d7c884532316223a6 Mon Sep 17 00:00:00 2001 From: Paulo Sousa Date: Wed, 13 Sep 2023 17:39:31 -0300 Subject: [PATCH] tsuru-stack: bump chart and deps --- charts/tsuru-stack/Chart.lock | 8 ++-- charts/tsuru-stack/Chart.yaml | 4 +- charts/tsuru-stack/templates/configmap.yaml | 11 +++++ charts/tsuru-stack/templates/daemonset.yaml | 51 +++++++++++++++++++++ charts/tsuru-stack/values.yaml | 17 ++++++- 5 files changed, 84 insertions(+), 7 deletions(-) create mode 100644 charts/tsuru-stack/templates/configmap.yaml create mode 100644 charts/tsuru-stack/templates/daemonset.yaml diff --git a/charts/tsuru-stack/Chart.lock b/charts/tsuru-stack/Chart.lock index 988f02c..7affcc8 100644 --- a/charts/tsuru-stack/Chart.lock +++ b/charts/tsuru-stack/Chart.lock @@ -1,13 +1,13 @@ dependencies: - name: tsuru-api repository: https://tsuru.github.io/charts - version: 0.2.12 + version: 0.2.16 - name: kubernetes-router repository: https://tsuru.github.io/charts version: 0.1.15 - name: ingress-nginx repository: https://kubernetes.github.io/ingress-nginx - version: 4.7.1 + version: 4.7.2 - name: tsuru-monitoring repository: https://tsuru.github.io/charts version: 0.1.1 @@ -23,5 +23,5 @@ dependencies: - name: deploy-agent repository: https://tsuru.github.io/charts version: 1.4.4 -digest: sha256:13883bfb8d6712e40c91ee4cdeb53ab73e64364e001766270813b2672b65b453 -generated: "2023-09-06T14:44:36.469821-03:00" +digest: sha256:f038bf62f78841ec4c0d31ad4ea212f120b1e236f3b23b4b4885d9a1545eb61c +generated: "2023-09-13T17:36:48.458377-03:00" diff --git a/charts/tsuru-stack/Chart.yaml b/charts/tsuru-stack/Chart.yaml index f4e7a62..a3a7722 100644 --- a/charts/tsuru-stack/Chart.yaml +++ b/charts/tsuru-stack/Chart.yaml @@ -15,11 +15,11 @@ 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.4.4 +version: 0.5.0 dependencies: - name: tsuru-api - version: "0.2.12" + version: "0.2.16" repository: https://tsuru.github.io/charts - name: kubernetes-router version: "0.1.15" diff --git a/charts/tsuru-stack/templates/configmap.yaml b/charts/tsuru-stack/templates/configmap.yaml new file mode 100644 index 0000000..332da6c --- /dev/null +++ b/charts/tsuru-stack/templates/configmap.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: registry-aliases + namespace: tsuru-system + labels: + kubernetes.io/minikube-addons: registry-aliases + addonmanager.kubernetes.io/mode: Reconcile +data: + registryAliases: >- + tsuru-registry.tsuru-system.svc.cluster.local diff --git a/charts/tsuru-stack/templates/daemonset.yaml b/charts/tsuru-stack/templates/daemonset.yaml new file mode 100644 index 0000000..08fa5d8 --- /dev/null +++ b/charts/tsuru-stack/templates/daemonset.yaml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: registry-aliases-hosts-update + namespace: tsuru-system + labels: + kubernetes.io/minikube-addons: registry-aliases + addonmanager.kubernetes.io/mode: Reconcile +spec: + selector: + matchLabels: + app: registry-aliases-hosts-update + template: + metadata: + labels: + app: registry-aliases-hosts-update + spec: + initContainers: + - name: update + image: alpine:3.18.3 + volumeMounts: + - name: etchosts + mountPath: /host-etc/hosts + readOnly: false + env: + - name: REGISTRY_ALIASES + valueFrom: + configMapKeyRef: + name: registry-aliases + key: registryAliases + command: + - sh + - -ce + - | + NL=$'\n' + TAB=$'\t' + HOSTS="$(cat /host-etc/hosts)" + [ -z "$TSURU_REGISTRY_SERVICE_HOST" ] && echo "Failed to get hosts entry for default registry" && exit 1; + for H in $REGISTRY_ALIASES; do + echo "$HOSTS" | grep "$H" || HOSTS="$HOSTS$NL$TSURU_REGISTRY_SERVICE_HOST$TAB$H"; + done; + echo "$HOSTS" | diff -u /host-etc/hosts - || echo "$HOSTS" > /host-etc/hosts + echo "Done." + containers: + - name: pause-for-update + image: gcr.io/google_containers/pause-amd64:3.1 + terminationGracePeriodSeconds: 30 + volumes: + - name: etchosts + hostPath: + path: /etc/hosts diff --git a/charts/tsuru-stack/values.yaml b/charts/tsuru-stack/values.yaml index 219605e..e63e812 100644 --- a/charts/tsuru-stack/values.yaml +++ b/charts/tsuru-stack/values.yaml @@ -31,6 +31,17 @@ tsuru-api: provisioner: "kubernetes" + clusters: + defaults: + build-service-address: "dns:///tsuru-deploy-agent:80" + registry-insecure: "true" + registry: "tsuru-registry.tsuru-system.svc.cluster.local" + build-service-tls: "false" + disable-default-node-selector: "true" + disable-node-containers: "true" + disable-unit-register: "true" + enable-logs-from-apiserver: "true" + docker: registry: tsuru-registry:80 resolve-registry-name: true @@ -70,7 +81,7 @@ kubernetes-router: mongodb: enabled: true image: - tag: 4.2.21-debian-10-r8 # tsuru does not support mongo 5 yet + tag: 4.4.15-debian-10-r8 # tsuru does not support mongo >4 yet auth: rootPassword: tsuru rootUser: root @@ -80,6 +91,10 @@ mongodb: - tsuru databases: - tsuru + livenessProbe: + enabled: false + readinessProbe: + enabled: false monitoring: enabled: false