Skip to content

Commit

Permalink
Merge branch 'release/v1.1.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jelemux authored and cesmarvin committed Oct 28, 2024
2 parents 62fff07 + efdfa9a commit e3a3bfc
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.1.0] - 2024-10-28
### Changed
- [#33] Make imagePullSecrets configurable via helm values and use `ces-container-registries` as default.

## [v1.0.0] - 2024-10-18
### Changed
- [#31] Use cluster native config instead of the etcd.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN make compile-generic
FROM gcr.io/distroless/static:nonroot
LABEL maintainer="[email protected]" \
NAME="k8s-backup-operator" \
VERSION="1.0.0"
VERSION="1.1.0"

WORKDIR /
COPY --from=builder /workspace/target/k8s-backup-operator .
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!groovy

@Library('github.com/cloudogu/ces-build-lib@2.3.0')
@Library('github.com/cloudogu/ces-build-lib@3.0.0')
import com.cloudogu.ces.cesbuildlib.*

// Creating necessary git objects
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Set these to the desired values
ARTIFACT_ID=k8s-backup-operator
VERSION=1.0.0
VERSION=1.1.0
IMAGE=cloudogu/${ARTIFACT_ID}:${VERSION}
GOTAG?=1.23
LINT_VERSION=v1.61.0
MAKEFILES_VERSION=9.2.1
MAKEFILES_VERSION=9.3.2
STAGE?=production

ADDITIONAL_CLEAN=dist-clean
Expand Down Expand Up @@ -53,7 +53,8 @@ helm-values-update-image-version: $(BINARY_YQ)
helm-values-replace-image-repo: $(BINARY_YQ)
@if [[ ${STAGE} == "development" ]]; then \
echo "Setting dev image repo in target values.yaml!" ;\
$(BINARY_YQ) -i e ".manager.image.repository=\"${IMAGE_DEV}\"" "${K8S_COMPONENT_TARGET_VALUES}" ;\
$(BINARY_YQ) -i e ".manager.image.registry=\"$(shell echo '${IMAGE_DEV}' | sed 's/\([^\/]*\)\/\(.*\)/\1/')\"" ${K8S_COMPONENT_TARGET_VALUES} ;\
$(BINARY_YQ) -i e ".manager.image.repository=\"$(shell echo '${IMAGE_DEV}' | sed 's/\([^\/]*\)\/\(.*\)/\2/')\"" ${K8S_COMPONENT_TARGET_VALUES} ;\
fi

.PHONY: template-stage
Expand Down
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.22
GOTAG?=1.23
GOOS?=linux
GOARCH?=amd64
PRE_COMPILE?=
Expand Down
2 changes: 1 addition & 1 deletion build/make/k8s-dogu.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: k8s.cloudogu.com/v1
apiVersion: k8s.cloudogu.com/v2
kind: Dogu
metadata:
name: NAME
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.22
GOTAG?=1.23
CUSTOM_GO_MOUNT?=-v /tmp:/tmp

REVIEW_DOG=$(TMP_DIR)/bin/reviewdog
LINT=$(TMP_DIR)/bin/golangci-lint
LINT_VERSION?=v1.58.2
LINT_VERSION?=v1.61.0
# ignore tests and mocks
LINTFLAGS=--tests=false --exclude-files="^.*_mock.go$$" --exclude-files="^.*/mock.*.go$$" --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
8 changes: 5 additions & 3 deletions k8s/helm/component-patch-tpl.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
apiVersion: v1
values:
images:
backupOperator: cloudogu/k8s-backup-operator:1.0.0
backupOperator: cloudogu/k8s-backup-operator:1.1.0
kubeRbacProxy: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1
patches:
values.yaml:
kubeRbacProxy:
image:
repository: "{{ registryFrom .images.kubeRbacProxy }}/{{ repositoryFrom .images.kubeRbacProxy }}"
registry: "{{ registryFrom .images.kubeRbacProxy }}"
repository: "{{ repositoryFrom .images.kubeRbacProxy }}"
tag: "{{ tagFrom .images.kubeRbacProxy }}"
manager:
image:
repository: "{{ registryFrom .images.backupOperator }}/{{ repositoryFrom .images.backupOperator }}"
registry: "{{ registryFrom .images.backupOperator }}"
repository: "{{ repositoryFrom .images.backupOperator }}"
tag: "{{ tagFrom .images.backupOperator }}"
8 changes: 6 additions & 2 deletions k8s/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ spec:
annotations:
kubectl.kubernetes.io/default-container: manager
spec:
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --v=0
image: {{ .Values.kubeRbacProxy.image.repository }}:{{ .Values.kubeRbacProxy.image.tag }}
image: "{{ .Values.kubeRbacProxy.image.registry }}/{{ .Values.kubeRbacProxy.image.repository }}:{{ .Values.kubeRbacProxy.image.tag }}"
name: kube-rbac-proxy
ports:
- containerPort: 8443
Expand All @@ -48,7 +52,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: {{ .Values.manager.image.repository }}:{{ .Values.manager.image.tag }}
image: "{{ .Values.manager.image.registry }}/{{ .Values.manager.image.repository }}:{{ .Values.manager.image.tag }}"
imagePullPolicy: {{ .Values.manager.imagePullPolicy | default "IfNotPresent" }}
livenessProbe:
httpGet:
Expand Down
6 changes: 5 additions & 1 deletion k8s/helm/templates/garbage-collection-manager-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ spec:
labels:
{{- include "k8s-backup-operator.selectorLabels" . | nindent 12 }}
spec:
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 10 }}
{{- end }}
containers:
- args:
- gc
Expand All @@ -29,7 +33,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: {{ .Values.manager.image.repository }}:{{ .Values.manager.image.tag }}
image: "{{ .Values.manager.image.registry }}/{{ .Values.manager.image.repository }}:{{ .Values.manager.image.tag }}"
imagePullPolicy: {{ .Values.manager.imagePullPolicy }}
name: garbage-collector
resources:
Expand Down
Empty file.
9 changes: 7 additions & 2 deletions k8s/helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
global:
imagePullSecrets:
- name: "ces-container-registries"
retention:
strategy: keepAll
garbageCollectionCron: "0 * * * *"
kubeRbacProxy:
image:
repository: gcr.io/kubebuilder/kube-rbac-proxy
registry: gcr.io
repository: kubebuilder/kube-rbac-proxy
tag: v0.14.1
resources:
limits:
Expand All @@ -17,8 +21,9 @@ manager:
stage: production
logLevel: info
image:
registry: docker.io
repository: cloudogu/k8s-backup-operator
tag: 1.0.0
tag: 1.1.0
imagePullPolicy: IfNotPresent
resources:
limits:
Expand Down

0 comments on commit e3a3bfc

Please sign in to comment.