Compare commits

..

7 Commits

Author SHA1 Message Date
Andrei Kvapil
c24a103fda Update mysql helm chart (#67)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-04-04 16:47:36 +02:00
Andrei Kvapil
8b975ff0cc Fix mysql app (#66)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-04-04 16:23:53 +02:00
Andrei Kvapil
e245d541b2 release v0.2.0 (#54)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-04-04 15:55:58 +02:00
Andrei Kvapil
f03f083c1a Rename bundles (#65)
- paas-full
- paas-hosted
- distro-full
- distro-hosted

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-04-04 15:54:14 +02:00
Andrei Kvapil
d68c6c68f6 Enable versioning for cozy-* charts (#62)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-04-04 12:33:54 +02:00
Andrei Kvapil
d5eb4dd62e Move flux to core package and avoid Helm installation (#61)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-04-04 12:31:42 +02:00
Andrei Kvapil
97cf386fc6 Merge pull request #59 from aenix-io/fix-cilium
fix cilium installation
2024-04-04 12:31:05 +02:00
98 changed files with 115 additions and 122 deletions

View File

@@ -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

View File

@@ -70,7 +70,7 @@ spec:
serviceAccountName: cozystack
containers:
- name: cozystack
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.1.0"
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.2.0"
env:
- name: KUBERNETES_SERVICE_HOST
value: localhost
@@ -89,7 +89,7 @@ spec:
fieldRef:
fieldPath: metadata.name
- name: darkhttpd
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.1.0"
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.2.0"
command:
- /usr/bin/darkhttpd
- /cozystack/assets

View File

@@ -1,4 +1,4 @@
{
"containerimage.config.digest": "sha256:318fd8d0d6f6127387042f6ad150e87023d1961c7c5059dd5324188a54b0ab4e",
"containerimage.digest": "sha256:e3cf145238e6e45f7f13b9acaea445c94ff29f76a34ba9fa50828401a5a3cc68"
"containerimage.config.digest": "sha256:0487fc50bb5f870720b05e947185424a400fad38b682af8f1ca4b418ed3c5b4b",
"containerimage.digest": "sha256:be12f3834be0e2f129685f682fab83c871610985fc43668ce6a294c9de603798"
}

View File

@@ -1,4 +1,4 @@
{
"containerimage.config.digest": "sha256:ee8968be63c7c45621ec45f3687211e0875acb24e8d9784e8d2ebcbf46a3538c",
"containerimage.digest": "sha256:16c3c07e74212585786dc1f1ae31d3ab90a575014806193e8e37d1d7751cb084"
"containerimage.config.digest": "sha256:43d0bfd01c5e364ba961f1e3dc2c7ccd7fd4ca65bd26bc8c4a5298d7ff2c9f4f",
"containerimage.digest": "sha256:908b3c186bee86f1c9476317eb6582d07f19776b291aa068e5642f8fd08fa9e7"
}

View File

@@ -16,7 +16,7 @@ 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
version: 0.2.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

View File

@@ -1,7 +1,7 @@
{{- range $name := .Values.databases }}
{{ $dnsName := replace "_" "-" $name }}
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
name: {{ $.Release.Name }}-{{ $dnsName }}

View File

@@ -1,5 +1,5 @@
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: MariaDB
metadata:
name: {{ .Release.Name }}
@@ -35,8 +35,9 @@ spec:
# automaticFailover: true
metrics:
enabled: true
exporter:
image: prom/mysqld-exporter:v0.14.0
image: prom/mysqld-exporter:v0.15.1
resources:
requests:
cpu: 50m
@@ -53,14 +54,10 @@ spec:
name: {{ .Release.Name }}-my-cnf
key: config
volumeClaimTemplate:
resources:
requests:
storage: {{ .Values.size }}
accessModes:
- ReadWriteOnce
storage:
size: {{ .Values.size }}
resizeInUseVolumes: true
waitForVolumeResize: true
{{- if .Values.external }}
primaryService:

View File

@@ -2,7 +2,7 @@
{{ if not (eq $name "root") }}
{{ $dnsName := replace "_" "-" $name }}
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: User
metadata:
name: {{ $.Release.Name }}-{{ $dnsName }}
@@ -15,7 +15,7 @@ spec:
key: {{ $name }}-password
maxUserConnections: {{ $u.maxUserConnections }}
---
apiVersion: mariadb.mmontes.io/v1alpha1
apiVersion: k8s.mariadb.com/v1alpha1
kind: Grant
metadata:
name: {{ $.Release.Name }}-{{ $dnsName }}

View File

@@ -1,6 +1,7 @@
http-cache 0.1.0 HEAD
kubernetes 0.1.0 HEAD
mysql 0.1.0 HEAD
mysql 0.1.0 f642698
mysql 0.2.0 HEAD
postgres 0.1.0 HEAD
rabbitmq 0.1.0 HEAD
redis 0.1.1 HEAD

View File

@@ -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

View File

@@ -1,2 +1,2 @@
name: cozy-fluxcd
version: 1.0.0
version: 0.2.0

View 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-

View File

@@ -1,2 +1,2 @@
name: cozy-installer
version: 1.0.0
version: 0.2.0

View File

@@ -1,4 +1,4 @@
NAMESPACE=cozy-installer
NAMESPACE=cozy-system
NAME=installer
PUSH := 1
LOAD := 0

View File

@@ -1,4 +1,4 @@
{
"containerimage.config.digest": "sha256:ec8a4983a663f06a1503507482667a206e83e0d8d3663dff60ced9221855d6b0",
"containerimage.digest": "sha256:abb7b2fbc1f143c922f2a35afc4423a74b2b63c0bddfe620750613ed835aa861"
"containerimage.config.digest": "sha256:326a169fb5d4277a5c3b0359e0c885b31d1360b58475bbc316be1971c710cd8d",
"containerimage.digest": "sha256:a608bdb75b3e06f6365f5f0b3fea82ac93c564d11f316f17e3d46e8a497a321d"
}

View File

@@ -1 +1 @@
ghcr.io/aenix-io/cozystack/cozystack:v0.1.0
ghcr.io/aenix-io/cozystack/cozystack:v0.2.0

View File

@@ -1,4 +1,4 @@
{
"containerimage.config.digest": "sha256:b869a6324f9c0e6d1dd48eee67cbe3842ee14efd59bdde477736ad2f90568ff7",
"containerimage.digest": "sha256:c30b237c5fa4fbbe47e1aba56e8f99569fe865620aa1953f31fc373794123cd7"
"containerimage.config.digest": "sha256:dc584f743bb73e04dcbebca7ab4f602f2c067190fd9609c3fd84412e83c20445",
"containerimage.digest": "sha256:39ab0bf769b269a8082eeb31a9672e39caa61dd342ba2157b954c642f54a32ff"
}

View File

@@ -1,2 +1,2 @@
name: cozy-platform
version: 1.0.0
version: 0.2.0

View File

@@ -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-

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -14,6 +14,10 @@
{{- end }}
{{- end }}
{{/* Add extra namespaces */}}
{{- $_ := set $namespaces "cozy-public" false }}
{{- $_ := set $namespaces "cozy-fluxcd" false }}
{{- range $namespace, $privileged := $namespaces }}
---
apiVersion: v1

View File

@@ -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

View File

@@ -1,2 +1,2 @@
name: cozy-capi-operator
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-capi-providers
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-cert-manager-issuers
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-cert-manager
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-cilium
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-dashboard
version: 1.0.0
version: 0.2.0

View File

@@ -1,4 +1,4 @@
{
"containerimage.config.digest": "sha256:c4bfb560aaa8f9bae1da00fa4b49b3e1fc993606902e47c155238f2b002fadce",
"containerimage.digest": "sha256:974cbeedb328e71aeb2b45970ebc1bcbbdcbdc0ed034a9d3d37924530f66b938"
"containerimage.config.digest": "sha256:89b67f6def744d8f497fd07e2743f1ff6f808983f4a5914cce62dbc8b045f9c4",
"containerimage.digest": "sha256:76b47055b4559a20362248ba1f684d41d2299e752665f09d606d5d07fd7c8c32"
}

View File

@@ -1,4 +1,4 @@
{
"containerimage.config.digest": "sha256:992221768278b67a64b52d4e8bc847f18c8e4be746ac7197be9bbfd4fd092b24",
"containerimage.digest": "sha256:6fb48ec9b50422bdd843584cd4db6ee07618ce535fde23903560d2529e4da31a"
"containerimage.config.digest": "sha256:8e9b42041ea86be05df5106bd7d3f881dda920a34a5f95b30c6affa8575275cf",
"containerimage.digest": "sha256:0a41fe424f7a042f5442152c2fc196622fd49426c958ff17b15b5b9060c8d86b"
}

View File

@@ -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

View File

@@ -1,2 +1,2 @@
name: cozy-grafana-oncall
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-grafana-operator
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-ingress-nginx
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-kamaji-etcd
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-kamaji
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-kubeovn
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-kubevirt-cdi-operator
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-kubevirt-cdi
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-kubevirt-csi-node
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-kubevirt-operator
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-kubevirt
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-linstor
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-mariadb-operator
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-metallb
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-monitoring
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-piraeus-operator
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-postgres-operator
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-rabbitmq-operator
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-redis-operator
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-telepresence
version: 1.0.0
version: 0.2.0

View File

@@ -1,2 +1,2 @@
name: cozy-victoria-metrics-operator
version: 1.0.0
version: 0.2.0

View File

@@ -1,11 +1,14 @@
#!/bin/sh
VERSION=2
set -o pipefail
set -e
BUNDLE=$(set -x; kubectl get configmap -n cozy-system cozystack -o 'go-template={{index .data "bundle-name"}}')
VERSION=2
run_migrations() {
if ! kubectl get configmap -n cozy-system cozystack-version; then
kubectl create configmap -n cozy-system cozystack-version --from-literal=version="$VERSION" --dry-run=client -o yaml | kubectl create -f-
return
fi
current_version=$(kubectl get configmap -n cozy-system cozystack-version -o jsonpath='{.data.version}') || true
until [ "$current_version" = "$VERSION" ]; do
@@ -20,14 +23,12 @@ flux_is_ok() {
}
install_basic_charts() {
bundle=$(kubectl get configmap -n cozy-system cozystack -o 'go-template={{index .data "bundle-name"}}')
if [ "$bundle" = "full-paas" ] || [ "$bundle" = "full-distro" ]; then
if [ "$BUNDLE" = "paas-full" ] || [ "$BUNDLE" = "distro-full" ]; then
make -C packages/system/cilium apply
fi
if [ "$bundle" = "full-paas" ]; then
if [ "$BUNDLE" = "paas-full" ]; then
make -C packages/system/kubeovn apply
fi
make -C packages/system/fluxcd apply
}
cd "$(dirname "$0")/.."
@@ -38,10 +39,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

View File

@@ -1,8 +1,25 @@
#!/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
# Fix kubeovn crds
kubeovn_crds=$(kubectl get crd -o name | grep '\.kubeovn\.io$')
if [ -n "$kubeovn_crds" ]; then
kubectl annotate $kubeovn_crds meta.helm.sh/release-namespace=cozy-kubeovn meta.helm.sh/release-name=kubeovn
kubectl label $kubeovn_crds app.kubernetes.io/managed-by=Helm
fi
# 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-