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

nyl template should error if only one namespace defined in a file and other resources are not in that namespace #19

Open
NiklasRosenstein opened this issue Aug 23, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@NiklasRosenstein
Copy link
Collaborator

Example:

---
apiVersion: v1
kind: Namespace
metadata:
  name: foo

---
apiVersion: inline.nyl.io/v1
kind: HelmChart
release:
  name: redis
  namespace: sccache
chart:
  # Explore the chart at https://artifacthub.io/packages/helm/bitnami/redis
  repository: https://charts.bitnami.com/bitnami
  name: redis
  version: "20.0.3"
values:
  architecture: standalone
  master:
    persistence:
      enabled: true
      storageClass: hcloud-volumes
      size: 64Gi

This should have nyl template error that resources are in the sccache namespace despite only foo being defined. What you actually get is

2024-08-23 19:20:23.094 | WARNING  | Resource 'NetworkPolicy/redis' in 'sccache-redis.yaml' references namespace 'sccache', which is not defined in the file.
2024-08-23 19:20:23.094 | WARNING  | Resource 'PodDisruptionBudget/redis-master' in 'sccache-redis.yaml' references namespace 'sccache', which is not defined in the file.
2024-08-23 19:20:23.094 | WARNING  | Resource 'ServiceAccount/redis-master' in 'sccache-redis.yaml' references namespace 'sccache', which is not defined in the file.
2024-08-23 19:20:23.094 | WARNING  | Resource 'Secret/redis' in 'sccache-redis.yaml' references namespace 'sccache', which is not defined in the file.
2024-08-23 19:20:23.094 | WARNING  | Resource 'ConfigMap/redis-configuration' in 'sccache-redis.yaml' references namespace 'sccache', which is not defined in the file.
2024-08-23 19:20:23.094 | WARNING  | Resource 'ConfigMap/redis-health' in 'sccache-redis.yaml' references namespace 'sccache', which is not defined in the file.
2024-08-23 19:20:23.095 | WARNING  | Resource 'ConfigMap/redis-scripts' in 'sccache-redis.yaml' references namespace 'sccache', which is not defined in the file.
2024-08-23 19:20:23.095 | WARNING  | Resource 'Service/redis-headless' in 'sccache-redis.yaml' references namespace 'sccache', which is not defined in the file.
2024-08-23 19:20:23.095 | WARNING  | Resource 'Service/redis-master' in 'sccache-redis.yaml' references namespace 'sccache', which is not defined in the file.
2024-08-23 19:20:23.095 | WARNING  | Resource 'StatefulSet/redis-master' in 'sccache-redis.yaml' references namespace 'sccache', which is not defined in the file.
@NiklasRosenstein NiklasRosenstein added the enhancement New feature or request label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant