Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
7224d31
#121 remove cache and use local dogu descriptor repository
meiserloh Sep 4, 2025
371a5ca
#121 prevent additional health checks, when unnecessary
meiserloh Sep 5, 2025
03b045b
[#125] ignore nginx dependency
Sep 8, 2025
13be6bc
#121 Update to newest CRD version
meiserloh Sep 11, 2025
ecde0fd
#121 Add unit test for spec change usecase
nhinze23 Sep 11, 2025
ba7e13d
[#125] replace annotation dependency with validate capabilities
Sep 12, 2025
c2506bf
#121 Fix tests and nil pointer problems
meiserloh Sep 12, 2025
315dce2
Merge remote-tracking branch 'origin/feature/121.2-apply-blueprint-co…
meiserloh Sep 12, 2025
e499e6e
[#125] install component crd
Sep 12, 2025
166b3aa
[#125] install component crd
Sep 12, 2025
9382d7e
#121 flatten config in domain
meiserloh Sep 15, 2025
51d641c
Merge pull request #126 from cloudogu/feature/125-ignore-nginx-depend…
kahoona77 Sep 15, 2025
b558509
Bump version
kahoona77 Sep 15, 2025
8ff6e30
Update changelog
kahoona77 Sep 15, 2025
74b6429
Merge branch 'release/v2.8.0' into develop
kahoona77 Sep 15, 2025
2fde501
#121 add tests
meiserloh Sep 15, 2025
8deed0e
#121 incorporate cesmarvin review
meiserloh Sep 15, 2025
0746b2c
#121 display only changes in stateDiff
meiserloh Sep 15, 2025
83d6311
#121 incorporate review comments
meiserloh Sep 16, 2025
7b169ed
Merge remote-tracking branch 'origin/develop' into feature/121.2-appl…
meiserloh Sep 16, 2025
b3db9e0
#121 rename domain DryRun to Stopped
meiserloh Sep 17, 2025
d0acd5b
#121 blueprint should be applied until completed
meiserloh Sep 17, 2025
637c8d4
#121 apply blueprint if not completed
meiserloh Sep 18, 2025
e518dea
#121 improve tests
meiserloh Sep 18, 2025
04a12f9
#121 reduce state diff events
meiserloh Sep 18, 2025
fa4e54e
#121 remove applied conditions in favor of LastApplySucceeded
meiserloh Sep 18, 2025
0e61e6a
#121 set conditions to unknown on first reconcile
meiserloh Sep 19, 2025
e5911f0
#121 fix sonar issues
meiserloh Sep 19, 2025
109bfd0
#121 reduce complexity further
meiserloh Sep 19, 2025
ed11c5d
#121 remove serialization of statediff to domain
meiserloh Sep 22, 2025
5395651
#121 remove serialization of statediff to domain
meiserloh Sep 22, 2025
d682af5
#121 enforce singlton cr
meiserloh Sep 22, 2025
08f542e
#121 fix logging for multiple blueprint errors
meiserloh Sep 23, 2025
8587953
#121 Upgrade to Golang v1.25.1 and Makefiles to v10.3.0
meiserloh Sep 24, 2025
d797621
#121 add DogusUpToDate Use Case
meiserloh Sep 24, 2025
c41e8f8
#121 pause reconciliation on config and version change
meiserloh Sep 25, 2025
c31d1a1
#121 censor sensitive config values in effective Blueprint
meiserloh Sep 25, 2025
ba2159f
#121 add display name to blueprint
meiserloh Sep 25, 2025
8d6559e
#121 clean up roles
meiserloh Sep 25, 2025
7e92c85
#121 clean up dependencies
meiserloh Sep 26, 2025
1aa0237
#121 fix todos
meiserloh Sep 26, 2025
6542ba8
#121 use k8s.ui/utils/ptr package instead of own helper
meiserloh Sep 26, 2025
710a299
#121 remove ReverseProxyConfig-Pointer from domain
meiserloh Sep 26, 2025
9c9200d
#121 remove Subfolder-Pointer from domain
meiserloh Sep 26, 2025
42904c4
#121 remove rewriteTarget- & additionalConfig-Pointer from domain
meiserloh Sep 26, 2025
e18577c
#121 remove config-Pointer from domain
meiserloh Sep 26, 2025
ece4020
#121 allow empty values in config
meiserloh Sep 29, 2025
1e094a2
#121 remove Todo
meiserloh Sep 29, 2025
7d8145a
#121 combine stateDiff events and throw ecosystemUnhealty only once
meiserloh Sep 29, 2025
14e31e4
#121 check ecosystem health before stateDiff to avoid overhead
meiserloh Sep 29, 2025
89fba7e
#121 upgrade makefiles to 10.4.0
meiserloh Sep 29, 2025
099c4dd
#121 apply cesmarvin review
meiserloh Sep 29, 2025
1024804
#121 apply cesmarvin review
meiserloh Sep 29, 2025
ca875ca
#121 update docs
meiserloh Sep 29, 2025
42762ff
#121 add stopped event and log
meiserloh Sep 30, 2025
81a97d2
#121 validate that sensitive config is not allowed to have normal values
meiserloh Sep 30, 2025
a206826
#121 only log stopped + event when actually stopped
meiserloh Oct 1, 2025
fed9ba6
#121 add debug log line for no ops reconciles
meiserloh Oct 1, 2025
1fdf8df
#121 retry notFoundErrors with backoff to handle not blueprints too
meiserloh Oct 2, 2025
7d84bce
#121 Handle all NotFoundErrors with retry except blueprints
meiserloh Oct 2, 2025
3dd94be
#121 set executable to false on missing config reference
meiserloh Oct 7, 2025
0d0d76e
#121 extract apply and preparation use case and clean up tests
meiserloh Oct 7, 2025
6522e73
#121 move domain object changes into aggregate
meiserloh Oct 7, 2025
f2f8548
#121 Move blueprint changes into the aggregate
meiserloh Oct 8, 2025
f93e267
#121 remove unnecessary rights to update finalizers
meiserloh Oct 8, 2025
7476cd7
#121 merge proxy config dogu action into one to simplify the status
meiserloh Oct 8, 2025
941962a
#121 remove unnecessary patch and update rights to whole blueprint
meiserloh Oct 10, 2025
bd8309a
#121 use crd-conditions
meiserloh Oct 10, 2025
b340d29
#121 fix typo
meiserloh Oct 10, 2025
ef37916
#121 clarify messages of not allowed actions
meiserloh Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

*Breaking Change ahead!*

### Added
- [#121] Added use case to check if dogus actually use the desired version and config before completing the blueprint

### Changed
- [#119] *breaking* sensitive dogu config can now only be referenced with secrets
- it was not safe to have these values in clear text in the blueprint
- it was not safe to have these values in clear text in the blueprint
- [#119] we now support blueprint v2 CRs
- [#121] all health checks are now non-blocking
- [#121] there are in general no steps anymore, which will block the reconciliation loop beyond some HTTP-Requests
- [#121] *breaking* blueprints will now be executed as a continuous process
- the operator will now detect changes and will enforce the content of the blueprint
- the operator will now detect changes and will enforce the content of the blueprint
- [#121] *breaking* the current state will now be reflected via conditions instead of the `statusPhase` field
- [#121] *breaking* events were reworked, some events are now more general, some events got removed completely
- Note, that events are for humans. You should not compute them for automation as they have no consistency guarantees.
- Note, that events are for humans. You should not compute them for automation as they have no consistency guarantees.
- [#121] Upgrade to Golang v1.25.1
- [#121] Upgrade Makefiles to v10.4.0
- [#121] *breaking* merge proxy config dogu action into one to simplify the status

### Removed
- [#119] *breaking* no support for v1 blueprint CRs anymore
- make sure to persist your blueprints before upgrading
- you need to transform your blueprints to the new v2 format yourself
- make sure to persist your blueprints before upgrading
- you need to transform your blueprints to the new v2 format yourself
- [#121] remove maintenance mode
- remove dependency to k8s-service-discovery (maintenance-mode was the reason for this dependency)
- [#121] *breaking* dogus will not be restarted by the blueprint operator anymore
- this is now the responsibility of the dogu operator
- this is now the responsibility of the dogu operator

## [v2.8.0] - 2025-09-15
### Changed
- [#125] ignore nginx dependencies

### Removed
- [#125] component-dependency for component-oprator-crd
- it is replaced by a helm capabilities-check for the component CRD

## [v2.7.0] - 2025-07-17
### Fixed
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.24.3 AS builder
FROM golang:1.25.1 AS builder

WORKDIR /workspace

Expand Down Expand Up @@ -34,7 +34,7 @@ RUN make compile-generic
FROM gcr.io/distroless/static:nonroot
LABEL maintainer="[email protected]" \
NAME="k8s-blueprint-operator" \
VERSION="2.7.0"
VERSION="2.8.0"

WORKDIR /
COPY --from=builder /workspace/target/k8s-blueprint-operator .
Expand Down
9 changes: 8 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ github = new GitHub(this, git)
changelog = new Changelog(this)
Docker docker = new Docker(this)
gpg = new Gpg(this, docker)
goVersion = "1.24.3"
goVersion = "1.25.1"
Makefile makefile = new Makefile(this)

componentOperatorVersion="1.10.0"

// Configuration of repository
repositoryOwner = "cloudogu"
repositoryName = "k8s-blueprint-operator"
Expand Down Expand Up @@ -109,6 +111,11 @@ node('docker') {
}

stage('Deploy Manager') {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'harborhelmchartpush', usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD']]) {
k3d.helm("registry login ${registry} --username '${HARBOR_USERNAME}' --password '${HARBOR_PASSWORD}'")
k3d.helm("install k8s-component-operator-crd oci://${registry}/k8s/k8s-component-operator-crd --version ${componentOperatorVersion}")
k3d.helm("registry logout ${registry}")
}
k3d.helm("install ${repositoryName} ${helmChartDir}")
}

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Set these to the desired values
ARTIFACT_ID=k8s-blueprint-operator
VERSION=2.7.0
VERSION=2.8.0
IMAGE=cloudogu/${ARTIFACT_ID}:${VERSION}
GOTAG=1.24.3
MAKEFILES_VERSION=10.2.0
GOTAG=1.25.1
MAKEFILES_VERSION=10.4.0
STAGE?=production


Expand Down
10 changes: 7 additions & 3 deletions build/make/bats.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BATS_SUPPORT=$(BATS_LIBRARY_DIR)/bats-support
BATS_FILE=$(BATS_LIBRARY_DIR)/bats-file
BATS_BASE_IMAGE?=bats/bats
BATS_CUSTOM_IMAGE?=cloudogu/bats
BATS_TAG?=1.11.0
BATS_TAG?=1.12.0
BATS_DIR=build/make/bats
BATS_WORKDIR="${WORKDIR}"/"${BATS_DIR}"

Expand All @@ -18,15 +18,19 @@ unit-test-shell: unit-test-shell-$(ENVIRONMENT)

$(BATS_ASSERT):
@git clone --depth 1 https://github.com/bats-core/bats-assert $@
@rm -rf $@/.git

$(BATS_MOCK):
@git clone --depth 1 https://github.com/grayhemp/bats-mock $@
@rm -rf $@/.git

$(BATS_SUPPORT):
@git clone --depth 1 https://github.com/bats-core/bats-support $@
@rm -rf $@/.git

$(BATS_FILE):
@git clone --depth 1 https://github.com/bats-core/bats-file $@
@rm -rf $@/.git

$(BASH_SRC):
BASH_SRC:=$(shell find "${WORKDIR}" -type f -name "*.sh")
Expand All @@ -49,10 +53,10 @@ unit-test-shell-local: $(BASH_SRC) $(PASSWD) $(ETCGROUP) $(HOME_DIR) buildTestIm
"${BATS_DIR}"/customBatsEntrypoint.sh make unit-test-shell-generic-no-junit

unit-test-shell-generic:
@bats --formatter junit --output ${BASH_TEST_REPORT_DIR} ${TESTS_DIR}
@bats --report-formatter junit --formatter junit --output ${BASH_TEST_REPORT_DIR} ${TESTS_DIR}

unit-test-shell-generic-no-junit:
@bats ${TESTS_DIR}
@bats --report-formatter junit --output ${BASH_TEST_REPORT_DIR} ${TESTS_DIR}

.PHONY buildTestImage:
buildTestImage:
Expand Down
2 changes: 1 addition & 1 deletion build/make/bats/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG BATS_BASE_IMAGE
ARG BATS_TAG

FROM ${BATS_BASE_IMAGE:-bats/bats}:${BATS_TAG:-1.11.0}
FROM ${BATS_BASE_IMAGE:-bats/bats}:${BATS_TAG:-1.12.0}

# Make bash more findable by scripts and tests
RUN apk add make git bash
Expand Down
9 changes: 8 additions & 1 deletion build/make/bats/customBatsEntrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@ set -o errexit
set -o nounset
set -o pipefail

"$@"
targetReportDir="${PWD}"/target/shell_test_reports
uidgid=1000:1000
exitcode=0
"$@" || exitcode=$?
echo "Resetting file ownership to ${uidgid} in ${targetReportDir}/"
chown -R ${uidgid} "${targetReportDir}"/*
echo "exiting with code ${exitcode}"
exit ${exitcode}
2 changes: 1 addition & 1 deletion build/make/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ADDITIONAL_LDFLAGS?=-extldflags -static
LDFLAGS?=-ldflags "$(ADDITIONAL_LDFLAGS) -X main.Version=$(VERSION) -X main.CommitID=$(COMMIT_ID)"
GOIMAGE?=golang
GOTAG?=1.24
GOTAG?=1.25
GOOS?=linux
GOARCH?=amd64
PRE_COMPILE?=
Expand Down
2 changes: 1 addition & 1 deletion build/make/k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BINARY_YQ_4_VERSION?=v4.40.3
BINARY_HELM = $(UTILITY_BIN_PATH)/helm
BINARY_HELM_VERSION?=v3.13.0
CONTROLLER_GEN = $(UTILITY_BIN_PATH)/controller-gen
CONTROLLER_GEN_VERSION?=v0.14.0
CONTROLLER_GEN_VERSION?=v0.19.0

# Setting SHELL to bash allows bash commands to be executed by recipes.
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
Expand Down
4 changes: 2 additions & 2 deletions build/make/static-analysis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

STATIC_ANALYSIS_DIR=$(TARGET_DIR)/static-analysis
GOIMAGE?=golang
GOTAG?=1.24
GOTAG?=1.25
CUSTOM_GO_MOUNT?=-v /tmp:/tmp

REVIEW_DOG=$(TMP_DIR)/bin/reviewdog
LINT=$(TMP_DIR)/bin/golangci-lint
LINT_VERSION?=v2.1.6
LINT_VERSION?=v2.5.0
# ignore tests and mocks
LINTFLAGS=--tests=false --timeout 10m --issues-exit-code 0
ADDITIONAL_LINTER=-E bodyclose -E containedctx -E contextcheck -E decorder -E dupl -E errname -E forcetypeassert -E funlen -E unparam
Expand Down
37 changes: 17 additions & 20 deletions docs/operations/apply_blueprints_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,32 @@
Sie können einen Blueprint anwenden, indem Sie eine `Blueprint`-Ressource auf den Cluster-Namespace anwenden, in dem das Cloudogu MultiNode EcoSystem läuft:

```yaml
apiVersion: k8s.cloudogu.com/v1
apiVersion: k8s.cloudogu.com/v2
kind: Blueprint
metadata:
labels:
app: ces
app.kubernetes.io/name: k8s-blueprint-lib
name: my-blueprint
spec:
# fügen Sie die blueprint.json hier ein
blueprint: |
{
"blueprintApi": "v2",
"dogus": [ ... ],
"components": [ ... ],
"config": {
"global": { ... },
"dogus": { ... }
}
}
# fügen Sie hier die blueprint-mask.json ein
blueprintMask: |
{
"blueprintMaskApi": "v1",
"blueprintMaskId": "my-blueprint-mask",
"dogus": [ ... ]
}
displayName: "Blueprint Sample v6.834"
# fügen Sie die blueprint hier ein
blueprint:
dogus: ...
components: ...
config:
global: ...
dogus: ...
# fügen Sie hier die blueprint-mask ein
blueprintMask:
dogus: ...
```

Das Dokument [Blueprint-Format](https://github.com/cloudogu/k8s-blueprint-lib/blob/develop/docs/operations/blueprintV2_format_de.md) beschreibt die Struktur des Blueprint im Detail.
Blueprint-CR-Beispiele können dem [Sample-Repository](https://github.com/cloudogu/k8s-ecosystem-samples/tree/main/blueprints) entnommen werden. Wenn `k8s-blueprint-operator` korrekt installiert wurde, lässt sich dies z. B. so auf den Cluster anwenden:

```bash
kubectl apply -n ecosystem -f k8s_v1_blueprint.yaml
kubectl apply -n ecosystem -f k8s_v2_blueprint.yaml
```

**Hinweis:** Pro Namespace ist nur ein Blueprint zulässig. Ändern Sie entweder das vorhandene Blueprint oder wenden Sie erneut ein `kubectl apply` mit demselben Blueprint-Namen an, um es zu aktualisieren.
38 changes: 18 additions & 20 deletions docs/operations/apply_blueprints_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,31 @@
You can apply a blueprint by applying a `Blueprint` resource to the cluster namespace where the Cloudogu MultiNode EcoSystem is running in:

```yaml
apiVersion: k8s.cloudogu.com/v1
apiVersion: k8s.cloudogu.com/v2
kind: Blueprint
metadata:
labels:
app: ces
app.kubernetes.io/name: k8s-blueprint-lib
name: my-blueprint
spec:
# put your blueprint.json here
blueprint: |
{
"blueprintApi": "v2",
"dogus": [ ... ],
"components": [ ... ],
"config": {
"global": { ... },
"dogus": { ... }
}
}
# put your blueprint-mask.json here
blueprintMask: |
{
"blueprintMaskApi": "v1",
"blueprintMaskId": "my-blueprint-mask",
"dogus": [ ... ]
}
displayName: "Blueprint Sample v6.834"
# put your blueprint here
blueprint:
dogus: ...
components: ...
config:
global: ...
dogus: ...
# put your blueprint-mask here
blueprintMask:
dogus: ...
```
The document [blueprint format](https://github.com/cloudogu/k8s-blueprint-lib/blob/develop/docs/operations/blueprintV2_format_en.md) describes the structure of the Blueprint in detail.
You may see examples of Blueprint-CRs in the [sample repository](https://github.com/cloudogu/k8s-ecosystem-samples/tree/main/blueprints). With `k8s-blueprint-operator` properly being installed, you can apply it to the cluster like this:

```bash
kubectl apply -n ecosystem -f k8s_v1_blueprint.yaml
kubectl apply -n ecosystem -f k8s_v2_blueprint.yaml
```

**Note:** Only one blueprint is permitted per namespace. Either change the existing one or apply with the same name to update it.
4 changes: 1 addition & 3 deletions docs/operations/health_checks_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ Dabei wird folgendes geprüft:
- Health aller Dogus anhand der Dogu-CRs
- Health aller Components anhand der Component-CRs
- Überprüfung, ob alle notwendigen Components installiert sind, die für das Blueprint gebraucht werden

Die Health-Checks verwenden einen eingebauten Retry.
Timeout und Check-Interval lassen sich dafür in der [Health-Config](#health-config) festlegen.
- Überprüfung, ob alle Dogus bereits die neueste Version und Konfiguration verwenden

## Health ignorieren

Expand Down
4 changes: 1 addition & 3 deletions docs/operations/health_checks_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ The following is checked:
- Health of all Dogus based on the Dogu-CRs
- Health of all components based on the component CRs
- Check whether all necessary components required for the blueprint are installed

The health checks use a built-in retry.
The timeout and check interval can be defined in the [Health-Config](#health-config).
- Check whether all Dogus already use the latest version and configuration

## Ignoring health

Expand Down
Loading