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

Helm chart: can't install due to missing resources #1061

Closed
nlamirault opened this issue Mar 17, 2023 · 2 comments
Closed

Helm chart: can't install due to missing resources #1061

nlamirault opened this issue Mar 17, 2023 · 2 comments
Labels
bug Something isn't working helm
Milestone

Comments

@nlamirault
Copy link
Contributor

nlamirault commented Mar 17, 2023

According to the documentation:

helm repo add klt https://charts.lifecycle.keptn.sh
helm repo update
helm upgrade --install keptn klt/klt -n keptn-lifecycle-toolkit-system --create-namespace --wait

but:

> helm template keptn klt/klt -n keptn-lifecycle-toolkit-system
Error: template: klt/templates/metrics-operator-webhook-service.yaml:9:18: executing "klt/templates/metrics-operator-webhook-service.yaml" at <.Values.metricsOperatorWebhookService.type>: nil pointer evaluating interface {}.type

There is not metricsOperatorWebhookService into the default Values file.
I try with these values:

metricsOperatorWebhookService:
  ports:
  - port: 443
    protocol: TCP
    targetPort: 9443
  type: ClusterIP

then another error:

❯ helm template  .
Error: template: klt/templates/metrics-operator-manager-config.yaml:12:40: executing "klt/templates/metrics-operator-manager-config.yaml" at <.Values.metricsOperatorManagerConfig.controllerManagerConfigYaml.health.healthProbeBindAddress>: nil pointer evaluating interface {}.controllerManagerConfigYaml

Also:

Error: template: klt/templates/metrics-operator-controller-metrics-service.yaml:10:18: executing "klt/templates/metrics-operator-controller-metrics-service.yaml" at <.Values.metricsOperatorControllerMetricsService.type>: nil pointer evaluating interface {}.type

another one:

helm template .
Error: template: klt/templates/klt-cert-manager-metrics-service.yaml:13:18: executing "klt/templates/klt-cert-manager-metrics-service.yaml" at <.Values.kltCertManagerMetricsService.type>: nil pointer evaluating interface {}.type

Could you try to use these Github Actions to validate the Helm chart:

  • helm/chart-testing-action
  • helm/chart-releaser-action

A final diff:

diff --git charts/keptn-lifecycle-toolkit/values.yaml charts/keptn-lifecycle-toolkit/values.yaml
index 020d242..e72c2cd 100644
--- charts/keptn-lifecycle-toolkit/values.yaml
+++ charts/keptn-lifecycle-toolkit/values.yaml
@@ -50,6 +50,28 @@ lifecycleManagerConfig:
       bindAddress: 127.0.0.1:8080
     webhook:
       port: 9443
+klcManagerConfig:
+  controllerManagerConfigYaml:
+    health:
+      healthProbeBindAddress: :8081
+    leaderElection:
+      leaderElect: true
+      resourceName: 6b866dd9.keptn.sh
+    metrics:
+      bindAddress: 127.0.0.1:8080
+    webhook:
+      port: 9443
+metricsOperatorManagerConfig:
+  controllerManagerConfigYaml:
+    health:
+      healthProbeBindAddress: :8081
+    leaderElection:
+      leaderElect: true
+      resourceName: 6b866dd9.keptn.sh
+    metrics:
+      bindAddress: 127.0.0.1:8080
+    webhook:
+      port: 9443
 lifecycleOperator:
   manager:
     containerSecurityContext:
@@ -114,6 +136,30 @@ lifecycleWebhookService:
     protocol: TCP
     targetPort: 9443
   type: ClusterIP
+metricsOperatorControllerMetricsService:
+  ports:
+  - port: 443
+    protocol: TCP
+    targetPort: 9443
+  type: ClusterIP
+kltCertManagerMetricsService:
+  ports:
+  - port: 443
+    protocol: TCP
+    targetPort: 9443
+  type: ClusterIP
+klcWebhookService:
+  ports:
+  - port: 443
+    protocol: TCP
+    targetPort: 9443
+  type: ClusterIP
+klcControllerManagerMetricsService:
+  ports:
+  - port: 443
+    protocol: TCP
+    targetPort: 9443
+  type: ClusterIP
 metricsManagerConfig:
   controllerManagerConfigYaml:
     health:
@@ -181,6 +227,12 @@ metricsWebhookService:
     protocol: TCP
     targetPort: 9443
   type: ClusterIP
+metricsOperatorWebhookService:
+  ports:
+  - port: 443
+    protocol: TCP
+    targetPort: 9443
+  type: ClusterIP
 scheduler:
   nodeSelector: {}
   replicas: 1
@agardnerIT
Copy link
Contributor

Hi @nlamirault thanks for reporting this. Indeed I just hit this too.

Do you have code that could be created as a PR to resolve this? If so, please create a PR and unblock both of us :D

@mowies mowies added bug Something isn't working helm labels Mar 21, 2023
@thisthat thisthat added this to the 0.8 milestone Mar 22, 2023
@thisthat thisthat moved this to 🏃 In progress in Keptn Lifecycle Toolkit Mar 22, 2023
@thisthat
Copy link
Member

this has been solved by #1082

@github-project-automation github-project-automation bot moved this from 🏃 In progress to ✅ Done in Keptn Lifecycle Toolkit Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working helm
Projects
Archived in project
Development

No branches or pull requests

4 participants