Skip to content

Update Juice-Shop Helm chart to use modern Ingress resource#1882

Merged
J12934 merged 5 commits intosecureCodeBox:mainfrom
maze88:main
Aug 31, 2023
Merged

Update Juice-Shop Helm chart to use modern Ingress resource#1882
J12934 merged 5 commits intosecureCodeBox:mainfrom
maze88:main

Conversation

@maze88
Copy link
Contributor

@maze88 maze88 commented Aug 29, 2023

Description

The Juice-Shop demo-target application can be installed to Kubernetes using a provided Helm chart which also allows exposing its service online via an Ingress resource. This Ingress resource's template (in the Helm chart) was using an out-dated API version.

This pull request contributes an up to date version of the Ingress resource's template to use the standard networking.k8s.io/v1 API version, instead of the old networking.k8s.io/v1beta1 or extensions/v1beta1 API versions (conditionally).

Testing

In order to test one can install with Helm to a Kubernetes cluster, or render the Kubernetes manifests with helm template and compare the YAML to the modern structure here.

Click to expand my test details...

With the values file:

# test-values.yaml
ingress:
  enabled: true
  className: nginx
  pathtype: ImplementationSpecific
  annotations: {}
  hosts:
  - host: juice.maze.omg.lol
    paths:
    - path: /
  tls:
  - hosts:
    - juice.maze.omg.lol
    secretName: juice-shop-tls

deploy with:

helm install my-juice . -f test-values.yaml

or run:

helm template my-juice . -f test-values.yaml | grep -A 26 Ingress

which yields:

kind: Ingress
metadata:
  name: my-juice-juice-shop
  labels:
    helm.sh/chart: juice-shop-v3.1.0-alpha3
    app.kubernetes.io/name: juice-shop
    app.kubernetes.io/instance: my-juice
    app.kubernetes.io/version: "v13.0.3"
    app.kubernetes.io/managed-by: Helm
spec:
  ingressClassName: "nginx"
  tls: 
  - hosts:
    - juice.maze.omg.lol
    secretName: juice-shop-tls
  rules:
  - host: juice.maze.omg.lol
    http:
      paths:
      - path: /
        pathType: ImplementationSpecific
        backend:
          service:
            name: my-juice-juice-shop
            port:
              number: 3000
---

@maze88
Copy link
Contributor Author

maze88 commented Aug 29, 2023

@Zero3141 recreated PR (#1877) with signed commits.

Copy link
Member

@J12934 J12934 left a comment

Choose a reason for hiding this comment

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

Hi! Perfect Thank you 🙌
One small naming consistency thing, everything else is looking good 👍

maze88 and others added 3 commits August 30, 2023 20:49
Co-authored-by: Jannik Hollenbach <[email protected]>
Signed-off-by: Michael Zeevi <[email protected]>
Co-authored-by: Jannik Hollenbach <[email protected]>
Signed-off-by: Michael Zeevi <[email protected]>
Signed-off-by: Michael Zeevi <[email protected]>
@J12934 J12934 merged commit 19351d0 into secureCodeBox:main Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants