Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix bug in configbind pkg #1861

Merged
merged 35 commits into from
Jul 1, 2024

Conversation

michaljurecko
Copy link
Contributor

@michaljurecko michaljurecko commented Jun 20, 2024

Jira: https://keboola.atlassian.net/browse/PSGO-597

Changes:

  • Fixed bug in configbind pkg, covered by k8s tests.

(only first commit)

@michaljurecko michaljurecko force-pushed the michaljurecko-PSGO-591-configbind-fix branch from 2db01cb to 8cec13a Compare June 20, 2024 09:56
@michaljurecko michaljurecko marked this pull request as ready for review July 1, 2024 13:11
Comment on lines -354 to +357
// Copy leaf values
if _, ok := v.(*orderedmap.OrderedMap); !ok {
// Copy leaf values = value is not object AND key is map step, not slice step
_, isObject := v.(*orderedmap.OrderedMap)
_, isMapKey := path.Last().(orderedmap.MapStep)
if !isObject && isMapKey {
Copy link
Contributor Author

@michaljurecko michaljurecko Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before fix, the code was stepping down to slice items, in the configuration structure.

Copy link

github-actions bot commented Jul 1, 2024

Apps Proxy Kubernetes Diff [CI]

Between base d05def1 ⬅️ head 8e1937a.

Expand
--- /tmp/artifacts/test-k8s-state.old.json.processed.kv	2024-07-01 13:16:49.841380711 +0000
+++ /tmp/artifacts/test-k8s-state.new.json.processed.kv	2024-07-01 13:16:49.965381083 +0000
@@ -105 +105 @@
-<Deployment/apps-proxy>.spec.template.spec.containers[0].image = "docker.io/keboola/apps-proxy:4f1bc71";
+<Deployment/apps-proxy>.spec.template.spec.containers[0].image = "docker.io/keboola/apps-proxy:8e1937a-1719839554";
@@ -461,3 +461,3 @@
-<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:4f1bc71";
-<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:4f1bc71";
-<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:4f1bc71";
+<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:8e1937a-1719839554";
+<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:8e1937a-1719839554";
+<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:8e1937a-1719839554";
@@ -879 +879 @@
-<ReplicaSet/apps-proxy-<hash>>.spec.template.spec.containers[0].image = "docker.io/keboola/apps-proxy:4f1bc71";
+<ReplicaSet/apps-proxy-<hash>>.spec.template.spec.containers[0].image = "docker.io/keboola/apps-proxy:8e1937a-1719839554";


(see artifacts in the Github Action for more information)

Copy link

github-actions bot commented Jul 1, 2024

Templates API Kubernetes Diff [CI]

Between base d05def1 ⬅️ head 8e1937a.

Expand
--- /tmp/artifacts/test-k8s-state.old.json.processed.kv	2024-07-01 13:18:40.344775132 +0000
+++ /tmp/artifacts/test-k8s-state.new.json.processed.kv	2024-07-01 13:18:40.556777166 +0000
@@ -79 +79 @@
-<CronJob/templates-api-etcd-defrag>.spec.jobTemplate.spec.template.spec.containers[0].image = "docker.io/bitnami/etcd:3.5.11-debian-11-r3";
+<CronJob/templates-api-etcd-defrag>.spec.jobTemplate.spec.template.spec.containers[0].image = "docker.io/bitnami/etcd:3.5.14-debian-12-r1";
@@ -194 +194 @@
-<Deployment/templates-api>.spec.template.spec.containers[0].image = "docker.io/keboola/templates-api:4f1bc71";
+<Deployment/templates-api>.spec.template.spec.containers[0].image = "docker.io/keboola/templates-api:8e1937a-1719839597";
@@ -747,3 +747,3 @@
-<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:4f1bc71";
-<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:4f1bc71";
-<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:4f1bc71";
+<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:8e1937a-1719839597";
+<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:8e1937a-1719839597";
+<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:8e1937a-1719839597";
@@ -1154,0 +1155,3 @@
+<Pod/templates-api-etcd-0>.spec.containers[0].env[24] = {};
+<Pod/templates-api-etcd-0>.spec.containers[0].env[24].name = "GOMEMLIMIT";
+<Pod/templates-api-etcd-0>.spec.containers[0].env[24].value = "256MiB";
@@ -1182 +1185 @@
-<Pod/templates-api-etcd-0>.spec.containers[0].image = "docker.io/bitnami/etcd:3.5.11-debian-11-r3";
+<Pod/templates-api-etcd-0>.spec.containers[0].image = "docker.io/bitnami/etcd:3.5.14-debian-12-r1";
@@ -1210,0 +1214,4 @@
+<Pod/templates-api-etcd-0>.spec.containers[0].resources.limits = {};
+<Pod/templates-api-etcd-0>.spec.containers[0].resources.limits.memory = "256Mi";
+<Pod/templates-api-etcd-0>.spec.containers[0].resources.requests = {};
+<Pod/templates-api-etcd-0>.spec.containers[0].resources.requests.memory = "256Mi";
@@ -1219 +1226 @@
-<Pod/templates-api-etcd-0>.spec.containers[0].startupProbe.failureThreshold = 60;
+<Pod/templates-api-etcd-0>.spec.containers[0].startupProbe.failureThreshold = 300;
@@ -1407 +1414 @@
-<ReplicaSet/templates-api-<hash>>.spec.template.spec.containers[0].image = "docker.io/keboola/templates-api:4f1bc71";
+<ReplicaSet/templates-api-<hash>>.spec.template.spec.containers[0].image = "docker.io/keboola/templates-api:8e1937a-1719839597";
@@ -1478,0 +1486,12 @@
+<Secret/sh.helm.release.v1.templates-api-etcd.v2> = {};
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.apiVersion = "v1";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.data = {};
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.kind = "Secret";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata = {};
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.labels = {};
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.labels.name = "templates-api-etcd";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.labels.owner = "helm";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.labels.version = "2";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.name = "sh.helm.release.v1.templates-api-etcd.v2";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.namespace = "templates-api";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.type = "helm.sh/release.v1";
@@ -1709,0 +1729,3 @@
+<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].env[24] = {};
+<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].env[24].name = "GOMEMLIMIT";
+<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].env[24].value = "256MiB";
@@ -1737 +1759 @@
-<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].image = "docker.io/bitnami/etcd:3.5.11-debian-11-r3";
+<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].image = "docker.io/bitnami/etcd:3.5.14-debian-12-r1";
@@ -1765,0 +1788,4 @@
+<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].resources.limits = {};
+<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].resources.limits.memory = "256Mi";
+<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].resources.requests = {};
+<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].resources.requests.memory = "256Mi";
@@ -1774 +1800 @@
-<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].startupProbe.failureThreshold = 60;
+<StatefulSet/templates-api-etcd>.spec.template.spec.containers[0].startupProbe.failureThreshold = 300;


(see artifacts in the Github Action for more information)

@michaljurecko michaljurecko merged commit d4ed892 into main Jul 1, 2024
16 checks passed
@michaljurecko michaljurecko deleted the michaljurecko-PSGO-591-configbind-fix branch July 1, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants