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

Missing Namespace in Service resources #151

Open
carhartl opened this issue Jan 10, 2023 · 2 comments
Open

Missing Namespace in Service resources #151

carhartl opened this issue Jan 10, 2023 · 2 comments

Comments

@carhartl
Copy link

The namespace that can be passed as Helm value isn't picked up in the Service resources part of the chart:

apiVersion: v1
kind: Service
metadata:
  name: {{ $root.Values.oldNamingStyle | ternary $endpoint.name (printf "%s-%s" (include "yugabyte.fullname" $root) $endpoint.name) | quote }}
  annotations:
...

=>

apiVersion: v1
kind: Service
metadata:
  name: {{ $root.Values.oldNamingStyle | ternary $endpoint.name (printf "%s-%s" (include "yugabyte.fullname" $root) $endpoint.name) | quote }}
  namespace: "{{ $root.Release.Namespace }}"
  annotations:
...

I was expecting all resources to be part of the namespace I'm specifying in the chart.

Similar to #64

@carhartl
Copy link
Author

Workaround in my case:

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmCharts:
  - name: yugabyte
    releaseName: yugabytedb
    repo: https://charts.yugabyte.com
    version: 2.17.0
    namespace: yugabytedb-system
    valuesInline:
      replicas:
        master: 1
        tserver: 1
      resource:
        master:
          requests:
            cpu: 0.5
            memory: 0.5Gi
        tserver:
          requests:
            cpu: 0.5
            memory: 0.5Gi
patches:
  - patch: |-
      - op: add
        path: /metadata/namespace
        value: yugabytedb-system
    target:
      version: v1
      kind: Service
      name: yb-.*

@iSignal
Copy link
Contributor

iSignal commented Feb 6, 2023

@carhartl : Thanks for letting us know. Please feel free to send over a PR, otherwise, we will include this in our bug prioritization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants