diff --git a/hack/e2e-apps/vminstance.bats b/hack/e2e-apps/vminstance.bats index eb5996bf..60513e8e 100644 --- a/hack/e2e-apps/vminstance.bats +++ b/hack/e2e-apps/vminstance.bats @@ -18,8 +18,8 @@ spec: EOF sleep 5 kubectl -n tenant-test wait hr vm-disk-$name --timeout=5s --for=condition=ready - kubectl -n tenant-test wait dv vm-disk-$name --timeout=150s --for=condition=ready - kubectl -n tenant-test wait pvc vm-disk-$name --timeout=100s --for=jsonpath='{.status.phase}'=Bound + kubectl -n tenant-test wait dv vm-disk-$name --timeout=250s --for=condition=ready + kubectl -n tenant-test wait pvc vm-disk-$name --timeout=200s --for=jsonpath='{.status.phase}'=Bound } @test "Create a VM Instance" { diff --git a/hack/e2e-install-cozystack.bats b/hack/e2e-install-cozystack.bats index 8ddac96e..fe7a9ec8 100644 --- a/hack/e2e-install-cozystack.bats +++ b/hack/e2e-install-cozystack.bats @@ -123,6 +123,7 @@ EOF @test "Configure Tenant and wait for applications" { # Patch root tenant and wait for its releases + kubectl patch tenants/root -n tenant-root --type merge -p '{"spec":{"host":"example.org","ingress":true,"monitoring":true,"etcd":true,"isolated":true, "seaweedfs": true}}' timeout 60 sh -ec 'until kubectl get hr -n tenant-root etcd ingress monitoring seaweedfs tenant-root >/dev/null 2>&1; do sleep 1; done' @@ -187,9 +188,22 @@ spec: ingress: false isolated: true monitoring: false - resourceQuotas: {} + resourceQuotas: + cpu: "60" + memory: "128Gi" + storage: "100Gi" seaweedfs: false EOF kubectl wait hr/tenant-test -n tenant-root --timeout=1m --for=condition=ready kubectl wait namespace tenant-test --timeout=20s --for=jsonpath='{.status.phase}'=Active + # Wait for ResourceQuota to appear and assert values + timeout 60 sh -ec 'until [ "$(kubectl get quota -n tenant-test --no-headers 2>/dev/null | wc -l)" -ge 1 ]; do sleep 1; done' + kubectl get quota -n tenant-test \ + -o jsonpath='{range .items[*]}{.spec.hard.requests\.memory}{" "}{.spec.hard.requests\.storage}{"\n"}{end}' \ + | grep -qx '137438953472 100Gi' + + # Assert LimitRange defaults for containers + kubectl get limitrange -n tenant-test \ + -o jsonpath='{range .items[*].spec.limits[*]}{.default.cpu}{" "}{.default.memory}{" "}{.defaultRequest.cpu}{" "}{.defaultRequest.memory}{"\n"}{end}' \ + | grep -qx '250m 128Mi 25m 128Mi' } diff --git a/packages/apps/clickhouse/Makefile b/packages/apps/clickhouse/Makefile index 0724f170..f1a0e443 100644 --- a/packages/apps/clickhouse/Makefile +++ b/packages/apps/clickhouse/Makefile @@ -8,16 +8,11 @@ generate: image: docker buildx build images/clickhouse-backup \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/clickhouse-backup:$(call settag,$(CLICKHOUSE_BACKUP_TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/clickhouse-backup:latest \ --cache-to type=inline \ --metadata-file images/clickhouse-backup.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) echo "$(REGISTRY)/clickhouse-backup:$(call settag,$(CLICKHOUSE_BACKUP_TAG))@$$(yq e '."containerimage.digest"' images/clickhouse-backup.json -o json -r)" \ > images/clickhouse-backup.tag rm -f images/clickhouse-backup.json diff --git a/packages/apps/http-cache/Makefile b/packages/apps/http-cache/Makefile index 802df1f2..91a170a5 100644 --- a/packages/apps/http-cache/Makefile +++ b/packages/apps/http-cache/Makefile @@ -7,16 +7,11 @@ image: image-nginx image-nginx: docker buildx build images/nginx-cache \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/nginx-cache:$(call settag,$(NGINX_CACHE_TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/nginx-cache:latest \ --cache-to type=inline \ --metadata-file images/nginx-cache.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) echo "$(REGISTRY)/nginx-cache:$(call settag,$(NGINX_CACHE_TAG))@$$(yq e '."containerimage.digest"' images/nginx-cache.json -o json -r)" \ > images/nginx-cache.tag rm -f images/nginx-cache.json diff --git a/packages/apps/http-cache/images/nginx-cache.tag b/packages/apps/http-cache/images/nginx-cache.tag index 46d89e57..ba1c0fd5 100644 --- a/packages/apps/http-cache/images/nginx-cache.tag +++ b/packages/apps/http-cache/images/nginx-cache.tag @@ -1 +1 @@ -ghcr.io/cozystack/cozystack/nginx-cache:0.7.0@sha256:e0a07082bb6fc6aeaae2315f335386f1705a646c72f9e0af512aebbca5cb2b15 +ghcr.io/cozystack/cozystack/nginx-cache:0.7.0@sha256:b7633717cd7449c0042ae92d8ca9b36e4d69566561f5c7d44e21058e7d05c6d5 diff --git a/packages/apps/kubernetes/Makefile b/packages/apps/kubernetes/Makefile index 437487f9..81520296 100644 --- a/packages/apps/kubernetes/Makefile +++ b/packages/apps/kubernetes/Makefile @@ -12,52 +12,37 @@ image: image-ubuntu-container-disk image-kubevirt-cloud-provider image-kubevirt- image-ubuntu-container-disk: docker buildx build images/ubuntu-container-disk \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --build-arg KUBERNETES_VERSION=${KUBERNETES_VERSION} \ --tag $(REGISTRY)/ubuntu-container-disk:$(call settag,$(KUBERNETES_VERSION)) \ --tag $(REGISTRY)/ubuntu-container-disk:$(call settag,$(KUBERNETES_VERSION)-$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/ubuntu-container-disk:latest \ --cache-to type=inline \ --metadata-file images/ubuntu-container-disk.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) echo "$(REGISTRY)/ubuntu-container-disk:$(call settag,$(KUBERNETES_VERSION))@$$(yq e '."containerimage.digest"' images/ubuntu-container-disk.json -o json -r)" \ > images/ubuntu-container-disk.tag rm -f images/ubuntu-container-disk.json image-kubevirt-cloud-provider: docker buildx build images/kubevirt-cloud-provider \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/kubevirt-cloud-provider:$(call settag,$(KUBERNETES_PKG_TAG)) \ --tag $(REGISTRY)/kubevirt-cloud-provider:$(call settag,$(KUBERNETES_PKG_TAG)-$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/kubevirt-cloud-provider:latest \ --cache-to type=inline \ --metadata-file images/kubevirt-cloud-provider.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) echo "$(REGISTRY)/kubevirt-cloud-provider:$(call settag,$(KUBERNETES_PKG_TAG))@$$(yq e '."containerimage.digest"' images/kubevirt-cloud-provider.json -o json -r)" \ > images/kubevirt-cloud-provider.tag rm -f images/kubevirt-cloud-provider.json image-kubevirt-csi-driver: docker buildx build images/kubevirt-csi-driver \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/kubevirt-csi-driver:$(call settag,$(KUBERNETES_PKG_TAG)) \ --tag $(REGISTRY)/kubevirt-csi-driver:$(call settag,$(KUBERNETES_PKG_TAG)-$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/kubevirt-csi-driver:latest \ --cache-to type=inline \ --metadata-file images/kubevirt-csi-driver.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) echo "$(REGISTRY)/kubevirt-csi-driver:$(call settag,$(KUBERNETES_PKG_TAG))@$$(yq e '."containerimage.digest"' images/kubevirt-csi-driver.json -o json -r)" \ > images/kubevirt-csi-driver.tag IMAGE=$$(cat images/kubevirt-csi-driver.tag) \ @@ -67,17 +52,12 @@ image-kubevirt-csi-driver: image-cluster-autoscaler: docker buildx build images/cluster-autoscaler \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/cluster-autoscaler:$(call settag,$(KUBERNETES_PKG_TAG)) \ --tag $(REGISTRY)/cluster-autoscaler:$(call settag,$(KUBERNETES_PKG_TAG)-$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/cluster-autoscaler:latest \ --cache-to type=inline \ --metadata-file images/cluster-autoscaler.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) echo "$(REGISTRY)/cluster-autoscaler:$(call settag,$(KUBERNETES_PKG_TAG))@$$(yq e '."containerimage.digest"' images/cluster-autoscaler.json -o json -r)" \ > images/cluster-autoscaler.tag rm -f images/cluster-autoscaler.json diff --git a/packages/apps/kubernetes/images/cluster-autoscaler.tag b/packages/apps/kubernetes/images/cluster-autoscaler.tag index 84b79782..64179a60 100644 --- a/packages/apps/kubernetes/images/cluster-autoscaler.tag +++ b/packages/apps/kubernetes/images/cluster-autoscaler.tag @@ -1 +1 @@ -ghcr.io/cozystack/cozystack/cluster-autoscaler:0.27.0@sha256:e4fbb7d2043f25b90cc8840468d0880e9d3d72ae8b1c8801bf8c35f944cc485d +ghcr.io/cozystack/cozystack/cluster-autoscaler:0.27.0@sha256:2d39989846c3579dd020b9f6c77e6e314cc81aa344eaac0f6d633e723c17196d diff --git a/packages/apps/kubernetes/images/kubevirt-csi-driver.tag b/packages/apps/kubernetes/images/kubevirt-csi-driver.tag index 6d192808..1776c9f8 100644 --- a/packages/apps/kubernetes/images/kubevirt-csi-driver.tag +++ b/packages/apps/kubernetes/images/kubevirt-csi-driver.tag @@ -1 +1 @@ -ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.27.0@sha256:c35987e8b37ad3b34a9a32fe6e80eee77b4c57b99090ca5cdbc3d16c25edb3b9 +ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.27.0@sha256:3a3bc912f70ccba1e9f92a0754179dbdc4c01f24073467b6d1406c77da794863 diff --git a/packages/apps/mysql/Makefile b/packages/apps/mysql/Makefile index bbc85d1f..d0576060 100644 --- a/packages/apps/mysql/Makefile +++ b/packages/apps/mysql/Makefile @@ -8,16 +8,11 @@ generate: image: docker buildx build images/mariadb-backup \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/mariadb-backup:$(call settag,$(MARIADB_BACKUP_TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/mariadb-backup:latest \ --cache-to type=inline \ --metadata-file images/mariadb-backup.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) echo "$(REGISTRY)/mariadb-backup:$(call settag,$(MARIADB_BACKUP_TAG))@$$(yq e '."containerimage.digest"' images/mariadb-backup.json -o json -r)" \ > images/mariadb-backup.tag rm -f images/mariadb-backup.json diff --git a/packages/apps/tenant/Chart.yaml b/packages/apps/tenant/Chart.yaml index 79702948..eeb9730e 100644 --- a/packages/apps/tenant/Chart.yaml +++ b/packages/apps/tenant/Chart.yaml @@ -4,4 +4,4 @@ description: Separated tenant namespace icon: /logos/tenant.svg type: application -version: 1.12.0 +version: 1.12.1 diff --git a/packages/apps/tenant/templates/quota.yaml b/packages/apps/tenant/templates/quota.yaml index 43941f56..6962d7c3 100644 --- a/packages/apps/tenant/templates/quota.yaml +++ b/packages/apps/tenant/templates/quota.yaml @@ -7,4 +7,21 @@ metadata: spec: hard: {{- include "cozy-lib.resources.flatten" (list .Values.resourceQuotas $) | nindent 6 }} +--- +apiVersion: v1 +kind: LimitRange +metadata: + name: tenant-range-limits + namespace: {{ include "tenant.name" . }} +spec: + limits: + - default: + cpu: "250m" + memory: "128Mi" + ephemeral-storage: "2Gi" + defaultRequest: + cpu: "25m" + memory: "128Mi" + ephemeral-storage: "50Mi" + type: Container {{- end }} diff --git a/packages/apps/versions_map b/packages/apps/versions_map index f68d6aa7..a08666d1 100644 --- a/packages/apps/versions_map +++ b/packages/apps/versions_map @@ -167,7 +167,8 @@ tenant 1.10.0 4369b031 tenant 1.11.0 08cb7c0f tenant 1.11.1 28c9fcd6 tenant 1.11.2 c02a3818 -tenant 1.12.0 HEAD +tenant 1.12.0 9c1563ad +tenant 1.12.1 HEAD virtual-machine 0.1.4 f2015d65 virtual-machine 0.1.5 263e47be virtual-machine 0.2.0 c0685f43 diff --git a/packages/apps/virtual-machine/templates/vm-update-hook.yaml b/packages/apps/virtual-machine/templates/vm-update-hook.yaml index aa233f95..171a6a94 100644 --- a/packages/apps/virtual-machine/templates/vm-update-hook.yaml +++ b/packages/apps/virtual-machine/templates/vm-update-hook.yaml @@ -64,14 +64,14 @@ spec: - | {{- if $needUpdateType }} echo "Patching VirtualMachine for instancetype update..." - kubectl patch virtualmachine {{ $vmName }} -n {{ $namespace }} \ + kubectl patch virtualmachines.kubevirt.io {{ $vmName }} -n {{ $namespace }} \ --type merge \ -p '{"spec":{"instancetype":{"name": "{{ $instanceType }}", "revisionName": null}}}' {{- end }} {{- if $needUpdateProfile }} echo "Patching VirtualMachine for preference update..." - kubectl patch virtualmachine {{ $vmName }} -n {{ $namespace }} \ + kubectl patch virtualmachines.kubevirt.io {{ $vmName }} -n {{ $namespace }} \ --type merge \ -p '{"spec":{"preference":{"name": "{{ $instanceProfile }}", "revisionName": null}}}' {{- end }} diff --git a/packages/apps/vm-instance/templates/vm-update-hook.yaml b/packages/apps/vm-instance/templates/vm-update-hook.yaml index 61a6fec1..4032aa00 100644 --- a/packages/apps/vm-instance/templates/vm-update-hook.yaml +++ b/packages/apps/vm-instance/templates/vm-update-hook.yaml @@ -54,14 +54,14 @@ spec: - | {{- if $needUpdateType }} echo "Patching VirtualMachine for instancetype update..." - kubectl patch virtualmachine {{ $vmName }} -n {{ $namespace }} \ + kubectl patch virtualmachines.kubevirt.io {{ $vmName }} -n {{ $namespace }} \ --type merge \ -p '{"spec":{"instancetype":{"name": "{{ $instanceType }}", "revisionName": null}}}' {{- end }} {{- if $needUpdateProfile }} echo "Patching VirtualMachine for preference update..." - kubectl patch virtualmachine {{ $vmName }} -n {{ $namespace }} \ + kubectl patch virtualmachines.kubevirt.io {{ $vmName }} -n {{ $namespace }} \ --type merge \ -p '{"spec":{"preference":{"name": "{{ $instanceProfile }}", "revisionName": null}}}' {{- end }} diff --git a/packages/core/installer/Makefile b/packages/core/installer/Makefile index 6a694e03..a51e7b61 100644 --- a/packages/core/installer/Makefile +++ b/packages/core/installer/Makefile @@ -24,15 +24,11 @@ image: pre-checks image-matchbox image-cozystack image-talos image-cozystack: docker buildx build -f images/cozystack/Dockerfile ../../.. \ - --provenance false \ --tag $(REGISTRY)/installer:$(call settag,$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/installer:latest \ - --platform linux/amd64 \ --cache-to type=inline \ --metadata-file images/installer.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) IMAGE="$(REGISTRY)/installer:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/installer.json -o json -r)" \ yq -i '.cozystack.image = strenv(IMAGE)' values.yaml rm -f images/installer.json @@ -45,15 +41,12 @@ image-matchbox: test -f ../../../_out/assets/kernel-amd64 || make talos-kernel test -f ../../../_out/assets/initramfs-metal-amd64.xz || make talos-initramfs docker buildx build -f images/matchbox/Dockerfile ../../.. \ - --provenance false \ --tag $(REGISTRY)/matchbox:$(call settag,$(TAG)) \ --tag $(REGISTRY)/matchbox:$(call settag,$(TALOS_VERSION)-$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/matchbox:latest \ --cache-to type=inline \ --metadata-file images/matchbox.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) echo "$(REGISTRY)/matchbox:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/matchbox.json -o json -r)" \ > ../../extra/bootbox/images/matchbox.tag rm -f images/matchbox.json diff --git a/packages/core/installer/values.yaml b/packages/core/installer/values.yaml index ecef1f0b..44260ce9 100644 --- a/packages/core/installer/values.yaml +++ b/packages/core/installer/values.yaml @@ -1,2 +1,2 @@ cozystack: - image: ghcr.io/cozystack/cozystack/installer:v0.35.2@sha256:1f1caa8b79869848e45b514c1bf29f96a196aa6cd439fa3c7212c30b0271638d + image: ghcr.io/cozystack/cozystack/installer:v0.35.5@sha256:8a0faca1b36d9e4351e490a02547e4d59f1606dfa70cbf5f2247911d50a78fcf diff --git a/packages/core/platform/templates/helmreleases.yaml b/packages/core/platform/templates/helmreleases.yaml index 269f3750..6ed61ed8 100644 --- a/packages/core/platform/templates/helmreleases.yaml +++ b/packages/core/platform/templates/helmreleases.yaml @@ -77,7 +77,7 @@ spec: {{- $values = merge . $values }} {{- end }} {{- with index $cozyConfig.data (printf "values-%s" $x.name) }} - {{- $values = merge (fromYaml .) $values }} + {{- $values = mergeOverwrite $values (fromYaml .) }} {{- end }} {{- with $values }} values: diff --git a/packages/core/testing/Makefile b/packages/core/testing/Makefile index 1e7fea3c..f345d155 100755 --- a/packages/core/testing/Makefile +++ b/packages/core/testing/Makefile @@ -16,16 +16,11 @@ image: image-e2e-sandbox image-e2e-sandbox: docker buildx build -f images/e2e-sandbox/Dockerfile images/e2e-sandbox \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/e2e-sandbox:$(call settag,$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/e2e-sandbox:latest \ --cache-to type=inline \ --metadata-file images/e2e-sandbox.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) IMAGE="$(REGISTRY)/e2e-sandbox:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/e2e-sandbox.json -o json -r)" \ yq -i '.e2e.image = strenv(IMAGE)' values.yaml rm -f images/e2e-sandbox.json diff --git a/packages/core/testing/values.yaml b/packages/core/testing/values.yaml index 0ad5dc66..e89cea86 100755 --- a/packages/core/testing/values.yaml +++ b/packages/core/testing/values.yaml @@ -1,2 +1,2 @@ e2e: - image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.35.2@sha256:aef4672d4d6c3f28b2fcab966ff76dd6dca1917d5c22bf23aff2f37d4d906245 + image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.35.5@sha256:b7deaff6eaac1398676054e6b89e57860cfb19ed86113696a5d54a41fc059eec diff --git a/packages/extra/bootbox/images/matchbox.tag b/packages/extra/bootbox/images/matchbox.tag index df5f6072..bd16e6ed 100644 --- a/packages/extra/bootbox/images/matchbox.tag +++ b/packages/extra/bootbox/images/matchbox.tag @@ -1 +1 @@ -ghcr.io/cozystack/cozystack/matchbox:v0.35.2@sha256:83ec3d69d9e45bc964b803e6d52dc3c6902ebb1573efbc3fa1bd9adfdadf968b +ghcr.io/cozystack/cozystack/matchbox:v0.35.5@sha256:cb82c5e6556d9330d9d3b293b1b32359193ea26b1899a62cc9dce99d12d72384 diff --git a/packages/extra/etcd/Chart.yaml b/packages/extra/etcd/Chart.yaml index f67b74d2..6e5f5358 100644 --- a/packages/extra/etcd/Chart.yaml +++ b/packages/extra/etcd/Chart.yaml @@ -3,4 +3,4 @@ name: etcd description: Storage for Kubernetes clusters icon: /logos/etcd.svg type: application -version: 2.10.0 +version: 2.10.1 diff --git a/packages/extra/etcd/templates/etcd-cluster.yaml b/packages/extra/etcd/templates/etcd-cluster.yaml index 19cef37a..017a3178 100644 --- a/packages/extra/etcd/templates/etcd-cluster.yaml +++ b/packages/extra/etcd/templates/etcd-cluster.yaml @@ -56,6 +56,9 @@ spec: {{- end }} {{- if $rawConstraints }} {{- $rawConstraints | fromYaml | toYaml | nindent 6 }} + labelSelector: + matchLabels: + app.kubernetes.io/instance: etcd {{- else }} topologySpreadConstraints: - maxSkew: 1 diff --git a/packages/extra/monitoring/Makefile b/packages/extra/monitoring/Makefile index 53608e14..5ae09c37 100644 --- a/packages/extra/monitoring/Makefile +++ b/packages/extra/monitoring/Makefile @@ -10,16 +10,11 @@ generate: image: docker buildx build images/grafana \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/grafana:$(call settag,$(GRAFANA_TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/grafana:latest \ --cache-to type=inline \ --metadata-file images/grafana.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) echo "$(REGISTRY)/grafana:$(call settag,$(GRAFANA_TAG))@$$(yq e '."containerimage.digest"' images/grafana.json -o json -r)" \ > images/grafana.tag rm -f images/grafana.json diff --git a/packages/extra/seaweedfs/images/objectstorage-sidecar.tag b/packages/extra/seaweedfs/images/objectstorage-sidecar.tag index c3b334da..f0231811 100644 --- a/packages/extra/seaweedfs/images/objectstorage-sidecar.tag +++ b/packages/extra/seaweedfs/images/objectstorage-sidecar.tag @@ -1 +1 @@ -ghcr.io/cozystack/cozystack/objectstorage-sidecar:v0.35.2@sha256:93ffb888755b2914fbbfc402a1daf450d628bced71629c53627b1b759740df72 +ghcr.io/cozystack/cozystack/objectstorage-sidecar:v0.35.5@sha256:a651d92dc4bd37089caf7baaec700b93042f9a226658003740065bd6b6ca4c82 diff --git a/packages/extra/versions_map b/packages/extra/versions_map index e981a9d1..ce0cdd27 100644 --- a/packages/extra/versions_map +++ b/packages/extra/versions_map @@ -16,7 +16,8 @@ etcd 2.7.0 632224a3 etcd 2.8.0 4369b031 etcd 2.9.0 8ddbe32e etcd 2.9.1 c02a3818 -etcd 2.10.0 HEAD +etcd 2.10.0 7f477eec +etcd 2.10.1 HEAD info 1.0.0 93bdf411 info 1.0.1 632224a3 info 1.1.0 c02a3818 diff --git a/packages/library/cozy-lib/templates/_resources.tpl b/packages/library/cozy-lib/templates/_resources.tpl index ee0fb732..637d04f6 100644 --- a/packages/library/cozy-lib/templates/_resources.tpl +++ b/packages/library/cozy-lib/templates/_resources.tpl @@ -172,3 +172,17 @@ {{- $xmsMi := min (div $memoryLimitInt 4194304) (div $memoryRequestInt 1048576) }} {{- printf `-Xms%dm -Xmx%dm` $xmsMi $xmxMi }} {{- end }} + +{{- define "cozy-lib.resources.flatten" -}} +{{- $out := dict -}} +{{- $res := include "cozy-lib.resources.sanitize" . | fromYaml -}} +{{- range $section, $values := $res }} + {{- range $k, $v := $values }} + {{- $key := printf "%s.%s" $section $k }} + {{- if ne $key "limits.storage" }} + {{- $_ := set $out $key $v }} + {{- end }} + {{- end }} +{{- end }} +{{- $out | toYaml }} +{{- end }} diff --git a/packages/system/bucket/Makefile b/packages/system/bucket/Makefile index 1f8d34b2..d555b71c 100644 --- a/packages/system/bucket/Makefile +++ b/packages/system/bucket/Makefile @@ -12,16 +12,11 @@ image: image-s3manager image-s3manager: docker buildx build images/s3manager \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/s3manager:$(call settag,$(S3MANAGER_TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/s3manager:latest \ --cache-to type=inline \ --metadata-file images/s3manager.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) echo "$(REGISTRY)/s3manager:$(call settag,$(S3MANAGER_TAG))@$$(yq e '."containerimage.digest"' images/s3manager.json -o json -r)" \ > images/s3manager.tag rm -f images/s3manager.json diff --git a/packages/system/bucket/images/s3manager.tag b/packages/system/bucket/images/s3manager.tag index 1f035889..718d045a 100644 --- a/packages/system/bucket/images/s3manager.tag +++ b/packages/system/bucket/images/s3manager.tag @@ -1 +1 @@ -ghcr.io/cozystack/cozystack/s3manager:v0.5.0@sha256:084c6e1665762cae38bac235c79c00d4ec61b5e73ad46ebf7eed596b2c5fcd0a +ghcr.io/cozystack/cozystack/s3manager:v0.5.0@sha256:82f8566a1c82afe16c10f8c9fef89e9953c7673f741671e55c5ba95999c3378f diff --git a/packages/system/cilium/Makefile b/packages/system/cilium/Makefile index 72502d12..269fb285 100644 --- a/packages/system/cilium/Makefile +++ b/packages/system/cilium/Makefile @@ -17,17 +17,12 @@ update: image: docker buildx build images/cilium \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/cilium:$(call settag,$(CILIUM_TAG)) \ --tag $(REGISTRY)/cilium:$(call settag,$(CILIUM_TAG)-$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/cilium:latest \ --cache-to type=inline \ --metadata-file images/cilium.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) REPOSITORY="$(REGISTRY)/cilium" \ yq -i '.cilium.image.repository = strenv(REPOSITORY)' values.yaml TAG=$(call settag,$(CILIUM_TAG)) \ diff --git a/packages/system/cozystack-api/Makefile b/packages/system/cozystack-api/Makefile index 1cd4ef66..d7504d01 100644 --- a/packages/system/cozystack-api/Makefile +++ b/packages/system/cozystack-api/Makefile @@ -8,16 +8,11 @@ image: image-cozystack-api image-cozystack-api: docker buildx build -f images/cozystack-api/Dockerfile ../../.. \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/cozystack-api:$(call settag,$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/cozystack-api:latest \ --cache-to type=inline \ --metadata-file images/cozystack-api.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) IMAGE="$(REGISTRY)/cozystack-api:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/cozystack-api.json -o json -r)" \ yq -i '.cozystackAPI.image = strenv(IMAGE)' values.yaml rm -f images/cozystack-api.json diff --git a/packages/system/cozystack-api/values.yaml b/packages/system/cozystack-api/values.yaml index e95cdf8a..9a4936a1 100644 --- a/packages/system/cozystack-api/values.yaml +++ b/packages/system/cozystack-api/values.yaml @@ -1,2 +1,2 @@ cozystackAPI: - image: ghcr.io/cozystack/cozystack/cozystack-api:v0.35.2@sha256:c545ecf298ce5f70d947ba3b9cbdb4415d540e62b1e991984bc8847db8e1943c + image: ghcr.io/cozystack/cozystack/cozystack-api:v0.35.5@sha256:cf59e6b8dccfa6085973779301612bb7c9562ee0774b78d187f2c395fa33a647 diff --git a/packages/system/cozystack-controller/Makefile b/packages/system/cozystack-controller/Makefile index a75faea9..9bbfb5a6 100644 --- a/packages/system/cozystack-controller/Makefile +++ b/packages/system/cozystack-controller/Makefile @@ -8,16 +8,11 @@ image: image-cozystack-controller update-version image-cozystack-controller: docker buildx build -f images/cozystack-controller/Dockerfile ../../.. \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/cozystack-controller:$(call settag,$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/cozystack-controller:latest \ --cache-to type=inline \ --metadata-file images/cozystack-controller.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) IMAGE="$(REGISTRY)/cozystack-controller:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/cozystack-controller.json -o json -r)" \ yq -i '.cozystackController.image = strenv(IMAGE)' values.yaml rm -f images/cozystack-controller.json diff --git a/packages/system/cozystack-controller/values.yaml b/packages/system/cozystack-controller/values.yaml index e7160ddf..dd49e3a9 100644 --- a/packages/system/cozystack-controller/values.yaml +++ b/packages/system/cozystack-controller/values.yaml @@ -1,5 +1,5 @@ cozystackController: - image: ghcr.io/cozystack/cozystack/cozystack-controller:v0.35.2@sha256:6052c5119485f3349aabde1950eedc847571cc8eefc62bc3bb3b3ac8202ea234 + image: ghcr.io/cozystack/cozystack/cozystack-controller:v0.35.5@sha256:af515041c7714df4fd62d8ceb5bda1ce1f1ab82dda12df9d41e8da23b4bb1990 debug: false disableTelemetry: false - cozystackVersion: "v0.35.2" + cozystackVersion: "v0.35.5" diff --git a/packages/system/dashboard/Makefile b/packages/system/dashboard/Makefile index 10df5382..fd83f384 100644 --- a/packages/system/dashboard/Makefile +++ b/packages/system/dashboard/Makefile @@ -28,16 +28,11 @@ update-dockerfiles: image-dashboard: update-version docker buildx build images/dashboard \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/dashboard:$(call settag,$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/dashboard:latest \ --cache-to type=inline \ --metadata-file images/dashboard.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) REGISTRY="$(REGISTRY)" \ yq -i '.kubeapps.dashboard.image.registry = strenv(REGISTRY)' values.yaml REPOSITORY="dashboard" \ @@ -50,16 +45,11 @@ image-dashboard: update-version image-kubeapps-apis: update-version docker buildx build images/kubeapps-apis \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/kubeapps-apis:$(call settag,$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/kubeapps-apis:latest \ --cache-to type=inline \ --metadata-file images/kubeapps-apis.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) REGISTRY="$(REGISTRY)" \ yq -i '.kubeapps.kubeappsapis.image.registry = strenv(REGISTRY)' values.yaml REPOSITORY="kubeapps-apis" \ diff --git a/packages/system/dashboard/charts/kubeapps/templates/dashboard/configmap.yaml b/packages/system/dashboard/charts/kubeapps/templates/dashboard/configmap.yaml index dd8925dc..553ef541 100644 --- a/packages/system/dashboard/charts/kubeapps/templates/dashboard/configmap.yaml +++ b/packages/system/dashboard/charts/kubeapps/templates/dashboard/configmap.yaml @@ -76,7 +76,7 @@ data: "kubeappsNamespace": {{ .Release.Namespace | quote }}, "helmGlobalNamespace": {{ include "kubeapps.helmGlobalPackagingNamespace" . | quote }}, "carvelGlobalNamespace": {{ .Values.kubeappsapis.pluginConfig.kappController.packages.v1alpha1.globalPackagingNamespace | quote }}, - "appVersion": "v0.35.2", + "appVersion": "v0.35.5", "authProxyEnabled": {{ .Values.authProxy.enabled }}, "oauthLoginURI": {{ .Values.authProxy.oauthLoginURI | quote }}, "oauthLogoutURI": {{ .Values.authProxy.oauthLogoutURI | quote }}, diff --git a/packages/system/dashboard/values.yaml b/packages/system/dashboard/values.yaml index 507aac35..7fd3d57e 100644 --- a/packages/system/dashboard/values.yaml +++ b/packages/system/dashboard/values.yaml @@ -19,7 +19,7 @@ kubeapps: image: registry: ghcr.io/cozystack/cozystack repository: dashboard - tag: v0.35.2 + tag: v0.35.5 digest: "sha256:54906b3d2492c8603a347a5938b6db36e5ed5c4149111cae1804ac9110361947" redis: master: @@ -37,8 +37,8 @@ kubeapps: image: registry: ghcr.io/cozystack/cozystack repository: kubeapps-apis - tag: v0.35.2 - digest: "sha256:2bbf386d90e1a2d8acbf2e4bc92d20d0b72d71589c08843f98efc06eadb4cb69" + tag: v0.35.5 + digest: "sha256:2cb21384385efbe2003abfe40acc1544e0cf6b11e1bdb9f7a7755c603620f774" pluginConfig: flux: packages: diff --git a/packages/system/kamaji/Makefile b/packages/system/kamaji/Makefile index 55921018..c24e2d4e 100644 --- a/packages/system/kamaji/Makefile +++ b/packages/system/kamaji/Makefile @@ -13,16 +13,11 @@ update: image: docker buildx build images/kamaji \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/kamaji:$(call settag,$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/kamaji:latest \ --cache-to type=inline \ --metadata-file images/kamaji.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" - --load=$(LOAD) + $(BUILDX_ARGS) REPOSITORY="$(REGISTRY)/kamaji" \ yq -i '.kamaji.image.repository = strenv(REPOSITORY)' values.yaml TAG=$(TAG)@$$(yq e '."containerimage.digest"' images/kamaji.json -o json -r) \ diff --git a/packages/system/kamaji/values.yaml b/packages/system/kamaji/values.yaml index a130acce..cd179472 100644 --- a/packages/system/kamaji/values.yaml +++ b/packages/system/kamaji/values.yaml @@ -3,7 +3,7 @@ kamaji: deploy: false image: pullPolicy: IfNotPresent - tag: v0.35.2@sha256:2b2c49d4f7dc649e3133b7f1dde3fc72f9d2f53004d99f9aa4051726e912d596 + tag: v0.35.5@sha256:7e58300744f1105df16e0afbc3e263a595582c9d56351810c40424a999170228 repository: ghcr.io/cozystack/cozystack/kamaji resources: limits: @@ -13,4 +13,4 @@ kamaji: cpu: 100m memory: 100Mi extraArgs: - - --migrate-image=ghcr.io/cozystack/cozystack/kamaji:v0.35.2@sha256:2b2c49d4f7dc649e3133b7f1dde3fc72f9d2f53004d99f9aa4051726e912d596 + - --migrate-image=ghcr.io/cozystack/cozystack/kamaji:v0.35.5@sha256:7e58300744f1105df16e0afbc3e263a595582c9d56351810c40424a999170228 diff --git a/packages/system/kubeovn-webhook/Makefile b/packages/system/kubeovn-webhook/Makefile index 76bf5f5a..9134d55f 100644 --- a/packages/system/kubeovn-webhook/Makefile +++ b/packages/system/kubeovn-webhook/Makefile @@ -6,16 +6,11 @@ include ../../../scripts/package.mk image: docker buildx build images/kubeovn-webhook \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/kubeovn-webhook:$(call settag,$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/kubeovn-webhook:latest \ --cache-to type=inline \ --metadata-file images/kubeovn-webhook.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" - --load=$(LOAD) + $(BUILDX_ARGS) IMAGE="$(REGISTRY)/kubeovn-webhook:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/kubeovn-webhook.json -o json -r)" \ yq -i '.image = strenv(IMAGE)' values.yaml rm -f images/kubeovn-webhook.json diff --git a/packages/system/kubeovn-webhook/values.yaml b/packages/system/kubeovn-webhook/values.yaml index 98f29a8d..ba9bf597 100644 --- a/packages/system/kubeovn-webhook/values.yaml +++ b/packages/system/kubeovn-webhook/values.yaml @@ -1,3 +1,3 @@ portSecurity: true routes: "" -image: ghcr.io/cozystack/cozystack/kubeovn-webhook:v0.35.2@sha256:a2e6c6619270769d56beb1166d09fdc541a7754757d567ede558e8ebdeae397a +image: ghcr.io/cozystack/cozystack/kubeovn-webhook:v0.35.5@sha256:37c4a3e28807d0e98f45f4c99aeb04d4ffdb4c79eca6e3f2c14483011b5fee6a diff --git a/packages/system/kubeovn/Makefile b/packages/system/kubeovn/Makefile index 1a21f6db..98f171cb 100644 --- a/packages/system/kubeovn/Makefile +++ b/packages/system/kubeovn/Makefile @@ -19,17 +19,12 @@ update: image: docker buildx build images/kubeovn \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --tag $(REGISTRY)/kubeovn:$(call settag,$(KUBEOVN_TAG)) \ --tag $(REGISTRY)/kubeovn:$(call settag,$(KUBEOVN_TAG)-$(TAG)) \ --cache-from type=registry,ref=$(REGISTRY)/kubeovn:latest \ --cache-to type=inline \ --metadata-file images/kubeovn.json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) REGISTRY="$(REGISTRY)" \ yq -i '.global.registry.address = strenv(REGISTRY)' values.yaml REPOSITORY="kubeovn" \ diff --git a/packages/system/kubeovn/values.yaml b/packages/system/kubeovn/values.yaml index 190974d8..e22b2731 100644 --- a/packages/system/kubeovn/values.yaml +++ b/packages/system/kubeovn/values.yaml @@ -64,4 +64,4 @@ global: images: kubeovn: repository: kubeovn - tag: v1.13.14@sha256:26426fd9a61be17cc3a9431629e94cbe3c3570f9129f344120abe935a89b7291 + tag: v1.13.14@sha256:465993a53ead58e846cd781a7fda28bb5426c21157120d35a6812b53665ed0b0 diff --git a/packages/system/kubevirt-csi-node/values.yaml b/packages/system/kubevirt-csi-node/values.yaml index 43b652a2..94fdb8ae 100644 --- a/packages/system/kubevirt-csi-node/values.yaml +++ b/packages/system/kubevirt-csi-node/values.yaml @@ -1,3 +1,3 @@ storageClass: replicated csiDriver: - image: ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.27.0@sha256:c35987e8b37ad3b34a9a32fe6e80eee77b4c57b99090ca5cdbc3d16c25edb3b9 + image: ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.27.0@sha256:3a3bc912f70ccba1e9f92a0754179dbdc4c01f24073467b6d1406c77da794863 diff --git a/packages/system/metallb/Makefile b/packages/system/metallb/Makefile index fbc3dfa0..5323f414 100644 --- a/packages/system/metallb/Makefile +++ b/packages/system/metallb/Makefile @@ -15,18 +15,13 @@ image-controller image-speaker: $(eval TARGET := $(subst image-,,$@)) $(eval VERSION := $(shell yq '.appVersion' charts/metallb/Chart.yaml)) docker buildx build images/metallb \ - --provenance false \ - --builder=$(BUILDER) \ - --platform=$(PLATFORM) \ --target $(TARGET) \ --build-arg VERSION=$(VERSION) \ --tag $(REGISTRY)/metallb-$(TARGET):$(VERSION) \ --cache-from type=registry,ref=$(REGISTRY)/metallb-$(TARGET):latest \ --cache-to type=inline \ --metadata-file images/$(TARGET).json \ - --push=$(PUSH) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \ - --load=$(LOAD) + $(BUILDX_ARGS) REPOSITORY="$(REGISTRY)/metallb-$(TARGET)" \ yq -i '.metallb.$(TARGET).image.repository = strenv(REPOSITORY)' values.yaml TAG=$(VERSION)@$$(yq e '."containerimage.digest"' images/$(TARGET).json -o json -r) \ diff --git a/packages/system/objectstorage-controller/Makefile b/packages/system/objectstorage-controller/Makefile index 493646b0..54c195a0 100644 --- a/packages/system/objectstorage-controller/Makefile +++ b/packages/system/objectstorage-controller/Makefile @@ -22,8 +22,7 @@ image-controller image-sidecar: --cache-from type=registry,ref=$(REGISTRY)/objectstorage-$(TARGET):latest \ --cache-to type=inline \ --metadata-file images/$(TARGET).json \ - --push=$(PUSH) --provenance=false --load=$(LOAD) \ - --label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" + $(BUILDX_ARGS) IMAGE="$(REGISTRY)/objectstorage-$(TARGET):$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/$(TARGET).json -r)" \ yq -i '$(YAML_PATH) = strenv(IMAGE)' $(VALUES_FILE) rm -f images/$(TARGET).json diff --git a/packages/system/objectstorage-controller/values.yaml b/packages/system/objectstorage-controller/values.yaml index c587dd10..24723803 100644 --- a/packages/system/objectstorage-controller/values.yaml +++ b/packages/system/objectstorage-controller/values.yaml @@ -1,3 +1,3 @@ objectstorage: controller: - image: "ghcr.io/cozystack/cozystack/objectstorage-controller:v0.35.2@sha256:11343e5f0d7f1bd1ab1a56d5ff6ca9dba080eb5952c66da5b7c7dcdeb01fde38" + image: "ghcr.io/cozystack/cozystack/objectstorage-controller:v0.35.5@sha256:aa0000265ae58155aebefedac72d0a6acc45437b8668bb9739bf11edefec067a" diff --git a/packages/system/seaweedfs/values.yaml b/packages/system/seaweedfs/values.yaml index d888a087..6f10b39a 100644 --- a/packages/system/seaweedfs/values.yaml +++ b/packages/system/seaweedfs/values.yaml @@ -84,6 +84,8 @@ seaweedfs: enableAuth: false readinessProbe: scheme: HTTPS + livenessProbe: + scheme: HTTPS logs: type: "" ingress: @@ -95,6 +97,10 @@ seaweedfs: nginx.ingress.kubernetes.io/proxy-buffering: "off" nginx.ingress.kubernetes.io/proxy-request-buffering: "off" nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" + nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" + nginx.ingress.kubernetes.io/client-body-timeout: "3600" + nginx.ingress.kubernetes.io/client-header-timeout: "120" acme.cert-manager.io/http01-ingress-class: tenant-root cert-manager.io/cluster-issuer: letsencrypt-prod tls: @@ -116,7 +122,7 @@ seaweedfs: bucketClassName: "seaweedfs" region: "" sidecar: - image: "ghcr.io/cozystack/cozystack/objectstorage-sidecar:v0.35.2@sha256:93ffb888755b2914fbbfc402a1daf450d628bced71629c53627b1b759740df72" + image: "ghcr.io/cozystack/cozystack/objectstorage-sidecar:v0.35.5@sha256:a651d92dc4bd37089caf7baaec700b93042f9a226658003740065bd6b6ca4c82" certificates: commonName: "SeaweedFS CA" ipAddresses: [] diff --git a/scripts/common-envs.mk b/scripts/common-envs.mk index ec11ada4..865935ef 100644 --- a/scripts/common-envs.mk +++ b/scripts/common-envs.mk @@ -1,8 +1,17 @@ REGISTRY ?= ghcr.io/cozystack/cozystack +TAG = $(shell git describe --tags --exact-match 2>/dev/null || echo latest) PUSH := 1 LOAD := 0 +BUILDER ?= +PLATFORM ?= +BUILDX_EXTRA_ARGS ?= COZYSTACK_VERSION = $(patsubst v%,%,$(shell git describe --tags)) -TAG = $(shell git describe --tags --exact-match 2>/dev/null || echo latest) + +BUILDX_ARGS := --provenance=false --push=$(PUSH) --load=$(LOAD) \ + --label org.opencontainers.image.source=https://github.com/cozystack/cozystack \ + $(if $(strip $(BUILDER)),--builder=$(BUILDER)) \ + $(if $(strip $(PLATFORM)),--platform=$(PLATFORM)) \ + $(BUILDX_EXTRA_ARGS) # Returns 'latest' if the git tag is not assigned, otherwise returns the provided value define settag @@ -15,10 +24,3 @@ ifeq ($(COZYSTACK_VERSION),) COZYSTACK_VERSION = $(patsubst v%,%,$(shell git describe --tags)) endif -# Get the name of the selected docker buildx builder -BUILDER ?= $(shell docker buildx inspect --bootstrap | head -n2 | awk '/^Name:/{print $$NF}') - -# Get platforms supported by the builder (only if PLATFORM is not provided) -ifeq ($(origin PLATFORM), undefined) -PLATFORM := $(shell docker buildx ls --format=json | jq -r 'select(.Name == "$(BUILDER)") | [.Nodes[].Platforms // []] | flatten | unique | map(select(test("^linux/amd64$$|^linux/arm64$$"))) | join(",")') -endif