From cf98fb60d43e108d90dcc735973840a7dd9e55b4 Mon Sep 17 00:00:00 2001 From: Korbinian Stoemmer Date: Thu, 14 Sep 2023 11:52:50 +0200 Subject: [PATCH 1/4] bump image --- sec-scanners-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sec-scanners-config.yaml b/sec-scanners-config.yaml index c1117189..bf385e4c 100644 --- a/sec-scanners-config.yaml +++ b/sec-scanners-config.yaml @@ -1,6 +1,6 @@ module-name: nats-manager protecode: - - europe-docker.pkg.dev/kyma-project/prod/nats-manager:v20230913-9746cb0c + - europe-docker.pkg.dev/kyma-project/prod/nats-manager:v20230914-8292cd02 - europe-docker.pkg.dev/kyma-project/prod/external/natsio/prometheus-nats-exporter:0.12.0 - europe-docker.pkg.dev/kyma-project/prod/external/natsio/nats-server-config-reloader:0.12.0 - europe-docker.pkg.dev/kyma-project/prod/external/nats:v20230620-2.9.18-alpine3.18 From d52dd9341dbc02c4dfaf87d190ece9151ec35b74 Mon Sep 17 00:00:00 2001 From: Korbinian Stoemmer Date: Thu, 14 Sep 2023 11:53:06 +0200 Subject: [PATCH 2/4] bump version --- .version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.version b/.version index e4bb8821..a4b99c5d 100644 --- a/.version +++ b/.version @@ -1,2 +1,2 @@ # next version to be released -MODULE_VERSION=0.1.1 +MODULE_VERSION=0.1.2 From 587f15d9f570716178823cf5515458c02591dd35 Mon Sep 17 00:00:00 2001 From: Korbinian Stoemmer Date: Thu, 14 Sep 2023 11:53:29 +0200 Subject: [PATCH 3/4] fix scripts --- Makefile | 5 +++ .../bases/operator.kyma-project.io_nats.yaml | 32 +++++++++---------- config/manager/kustomization.yaml | 6 ++++ scripts/release.sh | 5 +-- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 4003418f..afadf4fc 100644 --- a/Makefile +++ b/Makefile @@ -166,6 +166,11 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default | kubectl apply -f - +.PHONY: render-manifest +render-manifest: manifests kustomize + cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} + $(KUSTOMIZE) build config/default > nats-manager.yaml + .PHONY: undeploy undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f - diff --git a/config/crd/bases/operator.kyma-project.io_nats.yaml b/config/crd/bases/operator.kyma-project.io_nats.yaml index 1ce8ae61..47ae0baf 100644 --- a/config/crd/bases/operator.kyma-project.io_nats.yaml +++ b/config/crd/bases/operator.kyma-project.io_nats.yaml @@ -50,18 +50,18 @@ spec: size: 1Gi storageClassName: default memStorage: - enabled: false - size: 20Mi + enabled: true + size: 1Gi logging: debug: false trace: false resources: limits: - cpu: 20m - memory: 64Mi + cpu: 500m + memory: 1Gi requests: - cpu: 5m - memory: 16Mi + cpu: 40m + memory: 64Mi description: NATSSpec defines the desired state of NATS. properties: annotations: @@ -90,8 +90,8 @@ spec: size: 1Gi storageClassName: default memStorage: - enabled: false - size: 20Mi + enabled: true + size: 1Gi description: JetStream defines configurations that are specific to NATS JetStream. properties: @@ -127,20 +127,20 @@ spec: rule: self == oldSelf memStorage: default: - enabled: false - size: 20Mi + enabled: true + size: 1Gi description: MemStorage defines configurations to memory storage in NATS JetStream. properties: enabled: - default: false + default: true description: Enabled allows the enablement of memory storage. type: boolean size: anyOf: - type: integer - type: string - default: 20Mi + default: 1Gi description: Size defines the mem. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true @@ -176,11 +176,11 @@ spec: resources: default: limits: - cpu: 20m - memory: 64Mi + cpu: 500m + memory: 1Gi requests: - cpu: 5m - memory: 16Mi + cpu: 40m + memory: 64Mi description: Resources defines resources for NATS. properties: claims: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index bae98c97..602a048a 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -11,3 +11,9 @@ resources: - manager.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: controller + newName: op-skr-registry.localhost:8888/unsigned/manager-images/nats-manager + newTag: 0.1.1 diff --git a/scripts/release.sh b/scripts/release.sh index 27c75f28..93ce4c7f 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -37,9 +37,10 @@ echo "Generated nats-manager.yaml:" cat nats-manager.yaml MODULE_VERSION=${PULL_BASE_REF} make module-build +mv template.yaml module-template.yaml echo "Generated moduletemplate.yaml:" -cat moduletemplate.yaml +cat module-template.yaml echo "Updating github release with nats-manager.yaml" @@ -65,5 +66,5 @@ fi UPLOAD_URL="https://uploads.github.com/repos/kyma-project/nats-manager/releases/${RELEASE_ID}/assets" uploadFile "nats-manager.yaml" "${UPLOAD_URL}?name=nats-manager.yaml" -uploadFile "moduletemplate.yaml" "${UPLOAD_URL}?name=moduletemplate.yaml" +uploadFile "module-template.yaml" "${UPLOAD_URL}?name=module-template.yaml" uploadFile "config/samples/nats_default_cr.yaml" "${UPLOAD_URL}?name=nats_default_cr.yaml" From 72894665198a84b33cf3383a925c9e09528e1957 Mon Sep 17 00:00:00 2001 From: Korbinian Stoemmer Date: Thu, 14 Sep 2023 13:12:05 +0200 Subject: [PATCH 4/4] revert change to resources --- .../bases/operator.kyma-project.io_nats.yaml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/config/crd/bases/operator.kyma-project.io_nats.yaml b/config/crd/bases/operator.kyma-project.io_nats.yaml index 47ae0baf..1ce8ae61 100644 --- a/config/crd/bases/operator.kyma-project.io_nats.yaml +++ b/config/crd/bases/operator.kyma-project.io_nats.yaml @@ -50,18 +50,18 @@ spec: size: 1Gi storageClassName: default memStorage: - enabled: true - size: 1Gi + enabled: false + size: 20Mi logging: debug: false trace: false resources: limits: - cpu: 500m - memory: 1Gi - requests: - cpu: 40m + cpu: 20m memory: 64Mi + requests: + cpu: 5m + memory: 16Mi description: NATSSpec defines the desired state of NATS. properties: annotations: @@ -90,8 +90,8 @@ spec: size: 1Gi storageClassName: default memStorage: - enabled: true - size: 1Gi + enabled: false + size: 20Mi description: JetStream defines configurations that are specific to NATS JetStream. properties: @@ -127,20 +127,20 @@ spec: rule: self == oldSelf memStorage: default: - enabled: true - size: 1Gi + enabled: false + size: 20Mi description: MemStorage defines configurations to memory storage in NATS JetStream. properties: enabled: - default: true + default: false description: Enabled allows the enablement of memory storage. type: boolean size: anyOf: - type: integer - type: string - default: 1Gi + default: 20Mi description: Size defines the mem. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true @@ -176,11 +176,11 @@ spec: resources: default: limits: - cpu: 500m - memory: 1Gi - requests: - cpu: 40m + cpu: 20m memory: 64Mi + requests: + cpu: 5m + memory: 16Mi description: Resources defines resources for NATS. properties: claims: