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

Add check to ensure ArgoCD application created with Nyl doesn't point to a likely incorrect namespace #21

Open
NiklasRosenstein opened this issue Sep 4, 2024 · 0 comments
Assignees

Comments

@NiklasRosenstein
Copy link
Collaborator

When creating ArgoCD applications with Nly, a pattern I've found useful so far is to create the namespace and application in one file:

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

---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: backstage
  namespace: argocd
spec:
  project: default
  sources:
  - path: charts/backstage
    repoURL: https://gitlab.example.com/gitops/main.git
    targetRevision: HEAD
    helm:
      valuesObject:
        host: backstage.local
        secretName: backstage
  destination:
    server: "https://kubernetes.default.svc"
    namespace: backstage

Nyl should check if the destination.namespace really is the one being referenced here (only if the server is kubernetes.default.svc)

@NiklasRosenstein NiklasRosenstein self-assigned this Sep 4, 2024
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

1 participant