mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 04:33:36 +09:00
feat(kamaji)!: update to 26.9.4-edge
The tenant kube-apiserver argument list is no longer collapsed into a map keyed by flag name: entries supplied through the control plane spec reach the apiserver verbatim, duplicates included, and the reset that rewrites them from scratch keys on a hash of the list rather than on its length, so a same-count flag swap no longer strands the old flag on the running Deployment. The datastore deletion fix landed upstream verbatim, so its patch no longer applies, and one failing patch fails the whole apply of the directory. The module overlay is obsolete for the opposite reason: this tag already carries golang.org/x/net, golang.org/x/crypto and go.opentelemetry.io/otel/sdk above the versions the overlay forced, so keeping it would downgrade all three. The etcd.deploy override goes with it. The chart's dependency condition is kamaji-etcd.deploy and the subchart is not vendored here, so the key has never selected anything. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
13 files changed
+2907
-106
No files matched your search
@@ -123,9 +123,14 @@ versions:
|
||||
List of the endpoints to connect to the shared datastore.
|
||||
No need for protocol, just bare IP/FQDN and port.
|
||||
items:
|
||||
maxLength: 256
|
||||
type: string
|
||||
maxItems: 64
|
||||
minItems: 1
|
||||
type: array
|
||||
x-kubernetes-validations:
|
||||
- message: an IPv6 endpoint address must be bracketed, e.g. [2001:db8::1]:2379
|
||||
rule: self.all(e, e.startsWith('[') || e.split(':').size() <= 2)
|
||||
tlsConfig:
|
||||
description: |-
|
||||
Defines the TLS/SSL configuration required to connect to the data store in a secure way.
|
||||
|
||||
+1421
-37
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: kamaji-etcd
|
||||
repository: https://clastix.github.io/charts
|
||||
version: 0.11.0
|
||||
digest: sha256:96b4115b8c02f771f809ec1bed3be3a3903e7e8315d6966aa54b0f73230ea421
|
||||
generated: "2025-07-03T09:19:19.835421461+02:00"
|
||||
version: 0.15.0
|
||||
digest: sha256:dffc71b76c5711884d1bb4b66dee859e4dc70b149b02b4d36d0c60d299d7c55a
|
||||
generated: "2026-05-25T10:39:07.251403781+02:00"
|
||||
@@ -21,7 +21,7 @@ version: 0.0.0+latest
|
||||
dependencies:
|
||||
- name: kamaji-etcd
|
||||
repository: https://clastix.github.io/charts
|
||||
version: ">=0.11.0"
|
||||
version: ">=0.15.0"
|
||||
condition: kamaji-etcd.deploy
|
||||
annotations:
|
||||
catalog.cattle.io/certified: partner
|
||||
|
||||
@@ -22,7 +22,7 @@ Kubernetes: `>=1.21.0-0`
|
||||
|
||||
| Repository | Name | Version |
|
||||
|------------|------|---------|
|
||||
| https://clastix.github.io/charts | kamaji-etcd | >=0.11.0 |
|
||||
| https://clastix.github.io/charts | kamaji-etcd | >=0.15.0 |
|
||||
|
||||
[Kamaji](https://github.com/clastix/kamaji) requires a [multi-tenant `etcd`](https://github.com/clastix/kamaji-internal/blob/master/deploy/getting-started-with-kamaji.md#setup-internal-multi-tenant-etcd) cluster.
|
||||
This Helm Chart starting from v0.1.1 provides the installation of an internal `etcd` in order to streamline the local test. If you'd like to use an externally managed etcd instance, you can specify the overrides and by setting the value `etcd.deploy=false`.
|
||||
@@ -74,6 +74,7 @@ Here the values you can override:
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| affinity | object | `{}` | Kubernetes affinity rules to apply to Kamaji controller pods |
|
||||
| certManager.issuerRef | object | `{}` | Reference to an existing cert-manager issuer that signs the webhook serving certificate. When `name` is empty the chart creates a self-signed `Issuer` named `kamaji-selfsigned-issuer` and uses that. Set this to chain the webhook certificate to a certificate authority you own. `kind` defaults to `Issuer` and `group` to `cert-manager.io`. Note that the `kamaji-etcd` subchart has its own `kamaji-etcd.certManager.issuerRef`, which defaults to `kamaji-selfsigned-issuer` and has to be updated as well when the etcd certificates are issued by cert-manager. |
|
||||
| defaultDatastoreName | string | `"default"` | If specified, all the Kamaji instances with an unassigned DataStore will inherit this default value. |
|
||||
| extraArgs | list | `[]` | A list of extra arguments to add to the kamaji controller default ones |
|
||||
| fullnameOverride | string | `""` | |
|
||||
@@ -82,7 +83,7 @@ Here the values you can override:
|
||||
| image.repository | string | `"clastix/kamaji"` | The container image of the Kamaji controller. |
|
||||
| image.tag | string | `nil` | Overrides the image tag whose default is the chart appVersion. |
|
||||
| imagePullSecrets | list | `[]` | |
|
||||
| kamaji-etcd | object | `{"clusterDomain":"cluster.local","datastore":{"enabled":true,"name":"default"},"deploy":true,"fullnameOverride":"kamaji-etcd"}` | Subchart: See https://github.com/clastix/kamaji-etcd/blob/master/charts/kamaji-etcd/values.yaml |
|
||||
| kamaji-etcd | object | `{"certManager":{"enabled":true,"issuerRef":{"group":"cert-manager.io","kind":"Issuer","name":"kamaji-selfsigned-issuer"}},"clusterDomain":"cluster.local","datastore":{"enabled":true,"name":"default"},"deploy":true,"fullnameOverride":"kamaji-etcd","selfSignedCertificates":{"enabled":false}}` | Subchart: See https://github.com/clastix/kamaji-etcd/blob/master/charts/kamaji-etcd/values.yaml |
|
||||
| kubeconfigGenerator.affinity | object | `{}` | Kubernetes affinity rules to apply to Kubeconfig Generator controller pods |
|
||||
| kubeconfigGenerator.enableLeaderElect | bool | `true` | Enables the leader election. |
|
||||
| kubeconfigGenerator.enabled | bool | `false` | Toggle to deploy the Kubeconfig Generator Deployment. |
|
||||
|
||||
@@ -132,9 +132,14 @@ spec:
|
||||
List of the endpoints to connect to the shared datastore.
|
||||
No need for protocol, just bare IP/FQDN and port.
|
||||
items:
|
||||
maxLength: 256
|
||||
type: string
|
||||
maxItems: 64
|
||||
minItems: 1
|
||||
type: array
|
||||
x-kubernetes-validations:
|
||||
- message: an IPv6 endpoint address must be bracketed, e.g. [2001:db8::1]:2379
|
||||
rule: self.all(e, e.startsWith('[') || e.split(':').size() <= 2)
|
||||
tlsConfig:
|
||||
description: |-
|
||||
Defines the TLS/SSL configuration required to connect to the data store in a secure way.
|
||||
|
||||
+1421
-37
File diff suppressed because it is too large.
Load diff
@@ -1,3 +1,12 @@
|
||||
{{- $issuerRef := (.Values.certManager | default dict).issuerRef | default dict }}
|
||||
{{- $issuerName := "kamaji-selfsigned-issuer" }}
|
||||
{{- $issuerKind := "Issuer" }}
|
||||
{{- $issuerGroup := "cert-manager.io" }}
|
||||
{{- if $issuerRef.name }}
|
||||
{{- $issuerName = $issuerRef.name }}
|
||||
{{- $issuerKind = $issuerRef.kind | default $issuerKind }}
|
||||
{{- $issuerGroup = $issuerRef.group | default $issuerGroup }}
|
||||
{{- end }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
@@ -11,6 +20,7 @@ spec:
|
||||
- {{ include "kamaji.webhookServiceName" . }}.{{ .Release.Namespace }}.svc
|
||||
- {{ include "kamaji.webhookServiceName" . }}.{{ .Release.Namespace }}.svc.cluster.local
|
||||
issuerRef:
|
||||
kind: Issuer
|
||||
name: kamaji-selfsigned-issuer
|
||||
secretName: {{ include "kamaji.webhookSecretName" . }}
|
||||
kind: {{ $issuerKind | quote }}
|
||||
name: {{ $issuerName | quote }}
|
||||
group: {{ $issuerGroup | quote }}
|
||||
secretName: {{ include "kamaji.webhookSecretName" . }}
|
||||
@@ -1,3 +1,15 @@
|
||||
{{- $issuerRef := (.Values.certManager | default dict).issuerRef | default dict }}
|
||||
{{- $etcd := (index .Values "kamaji-etcd") | default dict }}
|
||||
{{- $etcdCertManager := $etcd.certManager | default dict }}
|
||||
{{- $etcdIssuerRef := $etcdCertManager.issuerRef | default dict }}
|
||||
{{/*
|
||||
kamaji-etcd carries its own issuerRef and cannot be pointed at another issuer from here, because a
|
||||
parent chart cannot set the values of a subchart conditionally. Keep the self-signed issuer as long
|
||||
as either the webhook certificate or kamaji-etcd refers to it, so that configuring certManager.issuerRef
|
||||
never leaves kamaji-etcd without an issuer.
|
||||
*/}}
|
||||
{{- $etcdNeedsSelfSigned := and $etcd.deploy $etcdCertManager.enabled (eq ($etcdIssuerRef.name | default "") "kamaji-selfsigned-issuer") }}
|
||||
{{- if or (not $issuerRef.name) $etcdNeedsSelfSigned }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
@@ -7,4 +19,5 @@ metadata:
|
||||
name: kamaji-selfsigned-issuer
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
selfSigned: {}
|
||||
selfSigned: {}
|
||||
{{- end }}
|
||||
@@ -98,12 +98,32 @@ loggingDevel:
|
||||
# -- If specified, all the Kamaji instances with an unassigned DataStore will inherit this default value.
|
||||
defaultDatastoreName: default
|
||||
|
||||
certManager:
|
||||
# -- Reference to an existing cert-manager issuer that signs the webhook serving certificate. When
|
||||
# `name` is empty the chart creates a self-signed `Issuer` named `kamaji-selfsigned-issuer` and uses
|
||||
# that. Set this to chain the webhook certificate to a certificate authority you own. `kind` defaults
|
||||
# to `Issuer` and `group` to `cert-manager.io`. Note that the `kamaji-etcd` subchart has its own
|
||||
# `kamaji-etcd.certManager.issuerRef`, which defaults to `kamaji-selfsigned-issuer` and has to be
|
||||
# updated as well when the etcd certificates are issued by cert-manager.
|
||||
issuerRef: {}
|
||||
# name: my-issuer
|
||||
# kind: ClusterIssuer
|
||||
# group: cert-manager.io
|
||||
|
||||
# -- Subchart: See https://github.com/clastix/kamaji-etcd/blob/master/charts/kamaji-etcd/values.yaml
|
||||
kamaji-etcd:
|
||||
deploy: true
|
||||
fullnameOverride: kamaji-etcd
|
||||
## -- Important, this must match your management cluster's clusterDomain, otherwise the init jobs will fail
|
||||
clusterDomain: "cluster.local"
|
||||
selfSignedCertificates:
|
||||
enabled: false
|
||||
certManager:
|
||||
enabled: true
|
||||
issuerRef:
|
||||
name: kamaji-selfsigned-issuer
|
||||
kind: Issuer
|
||||
group: cert-manager.io
|
||||
datastore:
|
||||
enabled: true
|
||||
name: default
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Build the manager binary
|
||||
FROM golang:1.26@sha256:079e59808d2d252516e27e3f3a9c003740dee7f75e55aa71528766d52bcfc16a AS builder
|
||||
|
||||
ARG VERSION=26.3.6-edge
|
||||
ARG VERSION=26.9.4-edge
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
@@ -12,13 +12,6 @@ RUN curl -sSL https://github.com/clastix/kamaji/archive/refs/tags/${VERSION}.tar
|
||||
COPY patches /patches
|
||||
RUN git apply /patches/*.diff
|
||||
|
||||
# Overlay patched Go modules. The kamaji edge tags up to 26.6.4 still pin
|
||||
# vulnerable golang.org/x/net (< 0.55.0), golang.org/x/crypto (< 0.52.0) and
|
||||
# go.opentelemetry.io/otel/sdk (< 1.43.0). These advisories ship inside the
|
||||
# compiled binary, so force the fixed versions before building.
|
||||
RUN go get golang.org/x/net@v0.55.0 golang.org/x/crypto@v0.52.0 go.opentelemetry.io/otel/sdk@v1.43.0 && \
|
||||
go mod tidy
|
||||
|
||||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build \
|
||||
-ldflags "-X github.com/clastix/kamaji/internal.GitRepo=$GIT_REPO -X github.com/clastix/kamaji/internal.GitTag=$GIT_LAST_TAG -X github.com/clastix/kamaji/internal.GitCommit=$GIT_HEAD_COMMIT -X github.com/clastix/kamaji/internal.GitDirty=$GIT_MODIFIED -X github.com/clastix/kamaji/internal.BuildTime=$BUILD_DATE" \
|
||||
-a -o kamaji main.go
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff --git a/controllers/datastore_controller.go b/controllers/datastore_controller.go
|
||||
--- a/controllers/datastore_controller.go
|
||||
+++ b/controllers/datastore_controller.go
|
||||
@@ -151,7 +151,7 @@ func (r *DataStore) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) {
|
||||
return reconcile.Result{}, nil
|
||||
}
|
||||
|
||||
- if meta.IsStatusConditionFalse(ds.Status.Conditions, kamajiv1alpha1.DataStoreConditionAllowedDeletionType) {
|
||||
+ if meta.IsStatusConditionFalse(ds.Status.Conditions, kamajiv1alpha1.DataStoreConditionAllowedDeletionType) || len(tcpList.Items) == 0 {
|
||||
logger.Info("DataStore is not used by any TenantControlPlane object")
|
||||
|
||||
meta.SetStatusCondition(&ds.Status.Conditions, metav1.Condition{
|
||||
@@ -1,6 +1,4 @@
|
||||
kamaji:
|
||||
etcd:
|
||||
deploy: false
|
||||
# HA-safe default: two replicas serve admission webhooks behind the
|
||||
# kamaji-webhook-service Service. --leader-elect is already enabled
|
||||
# upstream, so only one replica reconciles tenant control planes — the
|
||||
|
||||
Reference in new issue
Block a user