diff --git a/.github/workflows/helm-test-workflow.yaml b/.github/workflows/helm-test-workflow.yaml index 3cc8078b..a4f7a254 100644 --- a/.github/workflows/helm-test-workflow.yaml +++ b/.github/workflows/helm-test-workflow.yaml @@ -73,7 +73,7 @@ jobs: - uses: AbsaOSS/k3d-action@v2.4.0 with: cluster-name: "k3s-default" - k3d-version: "v5.4.9" # default version - change with caution, there was some problem after upgrade + k3d-version: "v5.6.0" args: >- --config=.k3d/single-cluster.yml --trace @@ -95,9 +95,10 @@ jobs: with: name: helm-build path: dist - - uses: AbsaOSS/k3d-action@v2 + - uses: AbsaOSS/k3d-action@v2.4.0 with: cluster-name: "k3s-default" + k3d-version: "v5.6.0" args: >- --config=.k3d/single-cluster.yml --trace @@ -119,9 +120,10 @@ jobs: with: name: helm-build path: dist - - uses: AbsaOSS/k3d-action@v2 + - uses: AbsaOSS/k3d-action@v2.4.0 with: cluster-name: "k3s-default" + k3d-version: "v5.6.0" args: >- --config=.k3d/single-cluster.yml --trace diff --git a/.gitignore b/.gitignore index efcad49a..03c3c417 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,7 @@ uninstall.sh logintopod.sh nussknacker-helm-chart.iml *.iml +.k3d/k3s_manifests/ccm.yaml +.k3d/k3s_manifests/coredns.yaml +.k3d/k3s_manifests/local-storage.yaml +.k3d/k3s_manifests/rolebindings.yaml diff --git a/.k3d/k3s_manifests/ingress-controller.yaml b/.k3d/k3s_manifests/ingress-controller.yaml new file mode 100644 index 00000000..1cc33e42 --- /dev/null +++ b/.k3d/k3s_manifests/ingress-controller.yaml @@ -0,0 +1,41 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: ingress-nginx +--- +apiVersion: helm.cattle.io/v1 +kind: HelmChart +metadata: + name: ingress-nginx + namespace: kube-system +spec: + chart: ingress-nginx + repo: https://kubernetes.github.io/ingress-nginx + targetNamespace: ingress-nginx + version: v4.4.2 + set: + valuesContent: |- + fullnameOverride: ingress-nginx + controller: + kind: DaemonSet + hostNetwork: true + ingressClassResource: + default: true + hostPort: + enabled: true + service: + enabled: false + publishService: + enabled: false + metrics: + enabled: false + serviceMonitor: + enabled: false + admissionWebhooks: + # when default value `Failure` is set, sometimes `deployment of req-resp with ingress` test fails on creating ingress with message: + # Internal error occurred: failed calling webhook \"validate.nginx.ingress.kubernetes.io\": failed to call webhook: Post \"https://ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1/ingresses?timeout=10s\": EOF" + # Short sleep before creating Ingress resource prevents it somehow, but we do not want to do that, so we change failurePolicy instead. + # We have our own assertion whether ingress works in this test anyway. + failurePolicy: Ignore + config: + use-forwarded-headers: "true" diff --git a/.k3d/single-cluster.yml b/.k3d/single-cluster.yml index 79525a39..9f9e3791 100644 --- a/.k3d/single-cluster.yml +++ b/.k3d/single-cluster.yml @@ -1,19 +1,27 @@ apiVersion: k3d.io/v1alpha4 kind: Simple -image: docker.io/rancher/k3s:v1.26.3-k3s1 +image: docker.io/rancher/k3s:v1.29.1-k3s2 servers: 1 agents: 1 options: k3d: wait: true timeout: "60s" - disableLoadbalancer: true + disableLoadbalancer: false disableRollback: true k3s: extraArgs: - - arg: --disable=metrics-server + - arg: --disable=traefik,metrics-server # instead of traefik we deploy ingress-nginx-controller by custom manifests in k3s nodeFilters: - server:* kubeconfig: updateDefaultKubeconfig: true switchCurrentContext: true +ports: + - port: 8081:80 # same as `--port '8081:80@loadbalancer'` + nodeFilters: + - loadbalancer +volumes: + - volume: $PROJECT_ROOT/.k3d/k3s_manifests/:/var/lib/rancher/k3s/server/manifests + nodeFilters: + - server:* diff --git a/deploy-values-kafka-config.yaml b/deploy-values-kafka-config.yaml index 2b442dd4..68ab8de6 100644 --- a/deploy-values-kafka-config.yaml +++ b/deploy-values-kafka-config.yaml @@ -1,7 +1,3 @@ nussknacker: - modelConfig: - components: - kafka: - config: - schemaRegistryCacheConfig: - availableSchemasExpirationTime: 0 seconds \ No newline at end of file + schemaRegistryCacheConfig: + availableSchemasExpirationTime: 0 seconds \ No newline at end of file diff --git a/src/Chart.lock b/src/Chart.lock index 7fcc907d..e170a112 100644 --- a/src/Chart.lock +++ b/src/Chart.lock @@ -22,6 +22,6 @@ dependencies: version: 4.12.5 - name: telegraf repository: https://helm.influxdata.com/ - version: 1.8.40 -digest: sha256:8e2f6ba85abf9dbcd13d59095fea97f4bdc1d6d021818b4358aa9cf98adb6651 -generated: "2024-01-22T10:37:44.781954+01:00" + version: 1.8.42 +digest: sha256:982e76c226551c0e835c96fcadedd9a517440970330586cf9c0b1998c530861e +generated: "2024-02-29T17:05:41.791955681+01:00" diff --git a/src/templates/configmap.yaml b/src/templates/configmap.yaml index fd0b07bc..8b2636ef 100644 --- a/src/templates/configmap.yaml +++ b/src/templates/configmap.yaml @@ -87,6 +87,9 @@ data: "bootstrap.servers": "{{ include "nussknacker.kafkaBootstrapServers" . }}" "schema.registry.url": "{{ include "nussknacker.schemaRegistryUrl" . }}" } + {{- with .Values.nussknacker.schemaRegistryCacheConfig }} + schemaRegistryCacheConfig: {{ tpl (toJson .) $ }} + {{- end }} } rocksDB { enable: true @@ -97,6 +100,9 @@ data: "bootstrap.servers": "{{ include "nussknacker.kafkaBootstrapServers" . }}" "schema.registry.url": "{{ include "nussknacker.schemaRegistryUrl" . }}" } + {{- with .Values.nussknacker.schemaRegistryCacheConfig }} + schemaRegistryCacheConfig: {{ tpl (toJson .) $ }} + {{- end }} } {{- end }} }{{- tpl ( mustToJson .Values.nussknacker.modelConfig ) . }} diff --git a/src/values.yaml b/src/values.yaml index 83e23c60..baa2eff2 100644 --- a/src/values.yaml +++ b/src/values.yaml @@ -193,7 +193,7 @@ kafka: apicurio-registry: enabled: true image: - tag: 2.2.5.Final + tag: 2.5.8.Final kafka: enabled: false