Oteemo / charts

Helm chart repository
https://oteemo.github.io/charts
MIT License
181 stars 234 forks source link

Fix ingress api checks #306

Closed rjkernick closed 2 years ago

rjkernick commented 2 years ago

fixes #305

Mikaciu commented 2 years ago

Hello,

Shouldn't line 47 of the SonarQube ingress have the $ context selector ? https://github.com/Oteemo/charts/blob/85203e9b21e180d7b8d6a3872dd20ca05a2122d6/charts/sonarqube/templates/ingress.yaml#L47

Suggestion :

-             {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
+            {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}

HTH

rjkernick commented 2 years ago

@Mikaciu I do not believe you need the $

EvgeniGordeev commented 2 years ago

@Mikaciu I do not believe you need the $

Error: UPGRADE FAILED: template: sonar/charts/sonarqube/templates/ingress.yaml:47:32: executing "sonar/charts/sonarqube/templates/ingress.yaml" at <.Capabilities.APIVersions.Has>: nil pointer evaluating interface {}.APIVersions

it must be {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }} as @Mikaciu pointed out.

patsevanton commented 2 years ago

After this commit broken ingress for kubernetes 1.18 https://github.com/Oteemo/charts/issues/311

Please rollback

patsevanton commented 2 years ago

kubectl version

Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.20",

helm install -f my-values.yaml sonatype-nexus oteemocharts/sonatype-nexus --version 5.3.3

Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "networking.k8s.io/v1"

helm install --atomic -f my-values.yaml sonatype-nexus oteemocharts/sonatype-nexus --version 5.3.2

NAME: sonatype-nexus
LAST DEPLOYED: Mon Sep 20 17:17:45 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
- To access Nexus:

  NOTE: It may take a few minutes for the ingress load balancer to become available or the backends to become HEALTHY.
        You can watch the status of the backends by running:
        `kubectl get ingress -o jsonpath='{.items[*].metadata.annotations.ingress\.kubernetes\.io/backends}'`

  To access Nexus you can check:
   http://nexus.xxxxx.sslip.io

- Login with the following credentials

   username: admin
   password: xxxx
- Next steps in configuration

   Please follow the link below to the README for nexus configuration, usage, backups and DR info:
   https://github.com/Oteemo/charts/tree/master/charts/sonatype-nexus#after-installing-the-chart
patsevanton commented 2 years ago

kubectl version

Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.10", 

helm install --atomic -f my-values.yaml sonatype-nexus oteemocharts/sonatype-nexus --version 5.3.3

NAME: sonatype-nexus
LAST DEPLOYED: Mon Sep 20 17:18:04 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
- To access Nexus:

  NOTE: It may take a few minutes for the ingress load balancer to become available or the backends to become HEALTHY.
        You can watch the status of the backends by running:
        `kubectl get ingress -o jsonpath='{.items[*].metadata.annotations.ingress\.kubernetes\.io/backends}'`

  To access Nexus you can check:
   http://nexus.xxxxxx.sslip.io

- Login with the following credentials

   username: admin
   password: xxxxx
- Next steps in configuration

   Please follow the link below to the README for nexus configuration, usage, backups and DR info:
   https://github.com/Oteemo/charts/tree/master/charts/sonatype-nexus#after-installing-the-chart

helm install --atomic -f my-values.yaml sonatype-nexus oteemocharts/sonatype-nexus --version 5.3.2

NAME: sonatype-nexus
LAST DEPLOYED: Mon Sep 20 17:22:38 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
- To access Nexus:

  NOTE: It may take a few minutes for the ingress load balancer to become available or the backends to become HEALTHY.
        You can watch the status of the backends by running:
        `kubectl get ingress -o jsonpath='{.items[*].metadata.annotations.ingress\.kubernetes\.io/backends}'`

  To access Nexus you can check:
   http://nexus.84-252-132-48.sslip.io

- Login with the following credentials

   username: admin
   password: admin123
- Next steps in configuration

   Please follow the link below to the README for nexus configuration, usage, backups and DR info:
   https://github.com/Oteemo/charts/tree/master/charts/sonatype-nexus#after-installing-the-chart
jetersen commented 2 years ago

Be careful this applies only to ingress v1... sadly the Has condition would also apply to ingress v1alpha, so be aware.