startechnica / apps

Community apps catalog for Kubernetes
Apache License 2.0
7 stars 5 forks source link

Error on helm install caused by virtual service #56

Open q1x opened 7 months ago

q1x commented 7 months ago

When performing a helm install I'm getting the following error:

$ helm install -f netbox-values.yaml netbox startechnica/netbox
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: apiVersion isn't string type

This seems to come from netbox/templates/istio/VirtualService.yaml (apiVersion: false):

$ helm template -f netbox-values.yaml startechnica/netbox
.
---
# Source: netbox/templates/istio/VirtualService.yaml
apiVersion: false
kind: VirtualService
metadata:
  name: release-name-netbox
  namespace: "default"
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: netbox
    app.kubernetes.io/version: v3.7.2
    helm.sh/chart: netbox-5.0.5
spec:
  gateways:
    - default/release-name-netbox
  hosts:
    - netbox.local
  http:
    - match:
        - uri:
            prefix: "/"
      route:
        - destination:
            host: release-name-netbox.default.svc.cluster.local
            port:
              number: 80
---
.

Any idea how to solve this?

q1x commented 7 months ago

Could be due to changes in https://github.com/startechnica/apps/commit/e23bcdfd9c974db18ff521d6071d6718ffdeb4d1 ?

firmansyahn commented 7 months ago

You should either have Istio service mesh or Kubernetes Gateway API installed to use Gateway. Or just set gateway.enabled to false to disable.

q1x commented 7 months ago

Hi @firmansyahn , thanks for the response. I have gateway.enabled set to false:

gateway:
  ## @param gateway.enabled  Enable Istio Gateway and VirtualService
  ##
  enabled: false
  ## @param gateway.dedicated
  ##
  dedicated: false
  ## @param gateway.gatewayApi
  ##
  gatewayApi:
    ## @param gateway.gatewayApi.create  Create Kubernetes Gateway API gateway
    ##
    create: false
  ## @param gateway.name
  ##
  name: ""
  ## @param gateway.namespace
  ##
  namespace: ""
  ## @param gateway.gatewayClassName
  ##
  gatewayClassName: istio
  ## @param gateway.listeners
  ##
  listeners: []
    # - name: http
    #   port: 80
    #   protocol: HTTP
    # - name: https
    #   port: 443
    #   protocol: HTTPS
  ## @param gateway.existingGateway
  ##
  existingGateway: ~
  ## @param gateway.existingVirtualService
  ##
  existingVirtualService: ~
  ## @param gateway.extraRoute Array of extra Kubernetes Gateway API Route to deploy with the release
  ##
  extraRoute: []