mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-31 02:18:59 +00:00
Compare commits
3 Commits
fix-cilium
...
versioning
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b2da61a74 | ||
|
|
d5eb4dd62e | ||
|
|
97cf386fc6 |
@@ -3,7 +3,7 @@ set -e
|
||||
|
||||
if [ -e $1 ]; then
|
||||
echo "Please pass version in the first argument"
|
||||
echo "Example: $0 v0.0.2"
|
||||
echo "Example: $0 0.2.0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -12,8 +12,14 @@ talos_version=$(awk '/^version:/ {print $2}' packages/core/installer/images/talo
|
||||
|
||||
set -x
|
||||
|
||||
sed -i "/^TAG / s|=.*|= ${version}|" \
|
||||
sed -i "/^TAG / s|=.*|= v${version}|" \
|
||||
packages/apps/http-cache/Makefile \
|
||||
packages/apps/kubernetes/Makefile \
|
||||
packages/core/installer/Makefile \
|
||||
packages/system/dashboard/Makefile
|
||||
|
||||
sed -i "/^VERSION / s|=.*|= ${version}|" \
|
||||
packages/core/Makefile \
|
||||
packages/system/Makefile
|
||||
make -C packages/core fix-chartnames
|
||||
make -C packages/system fix-chartnames
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
VERSION := 0.2.0
|
||||
|
||||
gen: fix-chartnames
|
||||
|
||||
fix-chartnames:
|
||||
find . -name Chart.yaml -maxdepth 2 | awk -F/ '{print $$2}' | while read i; do printf "name: cozy-%s\nversion: 1.0.0\n" "$$i" > "$$i/Chart.yaml"; done
|
||||
find . -name Chart.yaml -maxdepth 2 | awk -F/ '{print $$2}' | while read i; do printf "name: cozy-%s\nversion: $(VERSION)\n" "$$i" > "$$i/Chart.yaml"; done
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-fluxcd
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
13
packages/core/fluxcd/Makefile
Normal file
13
packages/core/fluxcd/Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
NAMESPACE=cozy-fluxcd
|
||||
NAME=fluxcd
|
||||
|
||||
API_VERSIONS_FLAGS=$(addprefix -a ,$(shell kubectl api-versions))
|
||||
|
||||
show:
|
||||
helm template -n $(NAMESPACE) $(NAME) . --no-hooks --dry-run=server $(API_VERSIONS_FLAGS)
|
||||
|
||||
apply:
|
||||
helm template -n $(NAMESPACE) $(NAME) . --no-hooks --dry-run=server $(API_VERSIONS_FLAGS) | kubectl apply -n $(NAMESPACE) -f-
|
||||
|
||||
diff:
|
||||
helm template -n $(NAMESPACE) $(NAME) . --no-hooks --dry-run=server $(API_VERSIONS_FLAGS) | kubectl diff -n $(NAMESPACE) -f-
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-installer
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
NAMESPACE=cozy-installer
|
||||
NAMESPACE=cozy-system
|
||||
NAME=installer
|
||||
PUSH := 1
|
||||
LOAD := 0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-platform
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -13,7 +13,7 @@ namespaces-show:
|
||||
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) -s templates/namespaces.yaml
|
||||
|
||||
namespaces-apply:
|
||||
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) -s templates/namespaces.yaml | kubectl apply -f-
|
||||
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) -s templates/namespaces.yaml | kubectl apply -n $(NAMESPACE) -f-
|
||||
|
||||
diff:
|
||||
helm template -n $(NAMESPACE) $(NAME) . --dry-run=server $(API_VERSIONS_FLAGS) | kubectl diff -f-
|
||||
|
||||
@@ -20,12 +20,6 @@ releases:
|
||||
ipv4NativeRoutingCIDR: "{{ index $cozyConfig.data "ipv4-pod-cidr" }}"
|
||||
autoDirectNodeRoutes: true
|
||||
|
||||
- name: fluxcd
|
||||
releaseName: fluxcd
|
||||
chart: cozy-fluxcd
|
||||
namespace: cozy-fluxcd
|
||||
dependsOn: [cilium]
|
||||
|
||||
- name: cert-manager
|
||||
releaseName: cert-manager
|
||||
chart: cozy-cert-manager
|
||||
|
||||
@@ -24,12 +24,6 @@ releases:
|
||||
SVC_CIDR: "{{ index $cozyConfig.data "ipv4-svc-cidr" }}"
|
||||
JOIN_CIDR: "{{ index $cozyConfig.data "ipv4-join-cidr" }}"
|
||||
|
||||
- name: fluxcd
|
||||
releaseName: fluxcd
|
||||
chart: cozy-fluxcd
|
||||
namespace: cozy-fluxcd
|
||||
dependsOn: [cilium,kubeovn]
|
||||
|
||||
- name: cert-manager
|
||||
releaseName: cert-manager
|
||||
chart: cozy-cert-manager
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
|
||||
|
||||
releases:
|
||||
- name: fluxcd
|
||||
releaseName: fluxcd
|
||||
chart: cozy-fluxcd
|
||||
namespace: cozy-fluxcd
|
||||
dependsOn: []
|
||||
|
||||
- name: cert-manager
|
||||
releaseName: cert-manager
|
||||
chart: cozy-cert-manager
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
{{- $cozyConfig := lookup "v1" "ConfigMap" "cozy-system" "cozystack" }}
|
||||
|
||||
releases:
|
||||
- name: fluxcd
|
||||
releaseName: fluxcd
|
||||
chart: cozy-fluxcd
|
||||
namespace: cozy-fluxcd
|
||||
dependsOn: []
|
||||
|
||||
- name: cert-manager
|
||||
releaseName: cert-manager
|
||||
chart: cozy-cert-manager
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- $_ := set $namespaces "cozy-fluxcd" false }}
|
||||
|
||||
{{- range $namespace, $privileged := $namespaces }}
|
||||
---
|
||||
apiVersion: v1
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
OUT=../../_out/repos/system
|
||||
VERSION := 0.2.0
|
||||
|
||||
gen: fix-chartnames
|
||||
|
||||
@@ -9,4 +10,4 @@ repo: fix-chartnames
|
||||
cd "$(OUT)" && helm repo index .
|
||||
|
||||
fix-chartnames:
|
||||
find . -name Chart.yaml -maxdepth 2 | awk -F/ '{print $$2}' | while read i; do printf "name: cozy-%s\nversion: 1.0.0\n" "$$i" > "$$i/Chart.yaml"; done
|
||||
find . -name Chart.yaml -maxdepth 2 | awk -F/ '{print $$2}' | while read i; do printf "name: cozy-%s\nversion: $(VERSION)\n" "$$i" > "$$i/Chart.yaml"; done
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-capi-operator
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-capi-providers
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-cert-manager-issuers
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-cert-manager
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-cilium
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-dashboard
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
NAMESPACE=cozy-fluxcd
|
||||
NAME=fluxcd
|
||||
|
||||
show:
|
||||
helm template --dry-run=server -n $(NAMESPACE) $(NAME) .
|
||||
|
||||
apply:
|
||||
helm upgrade -i -n $(NAMESPACE) $(NAME) .
|
||||
|
||||
apply-crds:
|
||||
helm template -n $(NAMESPACE) $(NAME) . $(addprefix -s ,$(wildcard charts/flux2/templates/*.crds.yaml)) | kubectl apply -f -
|
||||
kubectl annotate $$(kubectl get crd -o name | grep '\.fluxcd\.io$$') meta.helm.sh/release-namespace=$(NAMESPACE) meta.helm.sh/release-name=$(NAME)
|
||||
kubectl label $$(kubectl get crd -o name | grep '\.fluxcd\.io$$') app.kubernetes.io/managed-by=Helm
|
||||
|
||||
diff-crds:
|
||||
helm template -n $(NAMESPACE) $(NAME) . $(addprefix -s ,$(wildcard charts/flux2/templates/*.crds.yaml)) | kubectl apply -f -
|
||||
|
||||
diff:
|
||||
helm diff upgrade --allow-unreleased --normalize-manifests -n $(NAMESPACE) $(NAME) .
|
||||
|
||||
update:
|
||||
rm -rf charts
|
||||
helm pull oci://ghcr.io/fluxcd-community/charts/flux2 --untar --untardir charts
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-grafana-oncall
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-grafana-operator
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-ingress-nginx
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-kamaji-etcd
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-kamaji
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-kubeovn
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-kubevirt-cdi-operator
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-kubevirt-cdi
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-kubevirt-csi-node
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-kubevirt-operator
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-kubevirt
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-linstor
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-mariadb-operator
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-metallb
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-monitoring
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-piraeus-operator
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-postgres-operator
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-rabbitmq-operator
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-redis-operator
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-telepresence
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
name: cozy-victoria-metrics-operator
|
||||
version: 1.0.0
|
||||
version: 0.2.0
|
||||
|
||||
@@ -27,7 +27,6 @@ install_basic_charts() {
|
||||
if [ "$bundle" = "full-paas" ]; then
|
||||
make -C packages/system/kubeovn apply
|
||||
fi
|
||||
make -C packages/system/fluxcd apply
|
||||
}
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
@@ -38,10 +37,8 @@ run_migrations
|
||||
# Install namespaces
|
||||
make -C packages/core/platform namespaces-apply
|
||||
|
||||
# Install fluxcd CRDs
|
||||
if ! flux_is_ok; then
|
||||
make -C packages/system/fluxcd apply-crds
|
||||
fi
|
||||
# Install fluxcd
|
||||
make -C packages/core/fluxcd apply
|
||||
|
||||
# Reconcile Helm repositories
|
||||
kubectl annotate helmrepositories.source.toolkit.fluxcd.io -A -l cozystack.io/repository reconcile.fluxcd.io/requestedAt=$(date +"%Y-%m-%dT%H:%M:%SZ") --overwrite
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
#!/bin/sh
|
||||
# Migration 1 --> 2
|
||||
|
||||
# Fix mariadb-operator secrets
|
||||
if kubectl get -n cozy-mariadb-operator secret/mariadb-operator-webhook-cert; then
|
||||
kubectl annotate -n cozy-mariadb-operator secret/mariadb-operator-webhook-cert meta.helm.sh/release-namespace=cozy-mariadb-operator meta.helm.sh/release-name=mariadb-operator
|
||||
kubectl label -n cozy-mariadb-operator secret/mariadb-operator-webhook-cert app.kubernetes.io/managed-by=Helm
|
||||
fi
|
||||
|
||||
# Gratefully remove fluxcd release and keep resources
|
||||
if kubectl get hr -n cozy-fluxcd cozy-fluxcd 2>/dev/null; then
|
||||
kubectl patch hr -n cozy-fluxcd cozy-fluxcd -p '{"spec": {"suspend": true}, "metadata": {"finalizers": null}}' --type=merge
|
||||
kubectl delete hr -n cozy-fluxcd cozy-fluxcd
|
||||
fi
|
||||
kubectl delete secret -n cozy-fluxcd -l name=fluxcd
|
||||
|
||||
# Write version to cozystack-version config
|
||||
kubectl create configmap -n cozy-system cozystack-version --from-literal=version=2 --dry-run=client -o yaml | kubectl apply -f-
|
||||
|
||||
Reference in New Issue
Block a user