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

Issue with namespace after Sync the app #1

Closed
JimFran opened this issue Nov 12, 2021 · 1 comment
Closed

Issue with namespace after Sync the app #1

JimFran opened this issue Nov 12, 2021 · 1 comment

Comments

@JimFran
Copy link

JimFran commented Nov 12, 2021

Hello,

When Sync my APP I see this error related to namespaces:

SyncFailed
namespace akv2k8s is not permitted in project 'argocd''
namespace default is not permitted in project 'argocd'

this is my override_value.yml file:

## ArgoCD configuration
## Ref: https://github.com/argoproj/argo-cd
##
## Server
server:

  extraArgs:
    - --rootpath=/argocd

  ## ArgoCD config
  ## reference https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/argocd-cm.yaml
  configEnabled: true
  config:
    repositories: |
      - type: git
        url: https://XXX@dev.azure.com/XXX/Test/_git/MyRepo
      - name: argo-helm
        type: helm
        url: https://argoproj.github.io/argo-helm
  configs:
    credentialTemplates:
      https-creds:
        url: https://XXX@dev.azure.com/XXX/FranciscoTest/_git/MyRepo
        username: test
        password: XXX
  additionalApplications: 

    - name: argocd
      namespace: argocd
      destination:
        namespace: argocd
        server: https://kubernetes.default.svc
      project: argocd
      source:
        helm:
          version: v3
          valueFiles:
          - values.yaml
          - ../values-override.yaml
        path: argocd/argocd-install/argocd
        repoURL: https://XXX@dev.azure.com/XXX/Test/_git/MyRepo
        targetRevision: HEAD
      syncPolicy:
        syncOptions:
        - CreateNamespace=true

    - name: sonarqube
      namespace: argocd 
      destination:
        namespace: argocd
        server: https://kubernetes.default.svc
      project: argocd
      source:
        path: sonarque
        repoURL: https://XXX@dev.azure.com/XXX/Test/_git/MyRepo
        targetRevision: HEAD
        directory:
          recurse: true
          jsonnet: {}
      syncPolicy:
        automated:
          selfHeal: true
          prune: true

    - name: argocd-appprojects
      namespace: argocd
      destination:
        namespace: argocd
        server: https://kubernetes.default.svc
      project: argocd
      source:
        path: argocd/argocd-appprojects
        repoURL: https://XXX@dev.azure.com/XXX/Test/_git/MyRepo
        targetRevision: HEAD
        directory:
          recurse: true
          jsonnet: {}
      syncPolicy:
        automated:
          selfHeal: true
          prune: true
    

  additionalProjects: 
  - name: argocd
    namespace: argocd
    additionalLabels: {}
    additionalAnnotations: {}
    description: Argocd Project
    sourceRepos:
    - '*'
    destinations:
    - namespace: argocd
      server: https://kubernetes.default.svc
    clusterResourceWhitelist:
    - group: '*'
      kind: '*'
    orphanedResources:
      warn: false

  config:
    url: https://XXX/argocd
    application.instanceLabelKey: argocd.argoproj.io/instance

    oidc.config: |
      name: Azure
      issuer: https://login.microsoftonline.com/XXX/v2.0
      clientID: XXX
      clientSecret: $oidc.azuread.clientSecret
      requestedIDTokenClaims:
        groups:
          essential: true
      requestedScopes:
        - openid
        - profile
        - email

  rbacConfig:
    policy.csv: |
      p, role:admin, applications, *, */*, allow
      p, role:admin, clusters, get, *, allow
      p, role:admin, repositories, get, *, allow
      p, role:admin, repositories, create, *, allow
      p, role:admin, repositories, update, *, allow
      p, role:admin, repositories, delete, *, allow
      g, XXX, role:admin
    policy.default: role:readonly
    

My App files should be deployed in default, akv2k8s, ... namespaces and argocd in argocd namespace.

Any idea?

Thanks in advance.

@JimFran JimFran changed the title How to include RBAC, secret to modify argocd-cm, argocd-rbac-cm and argocd-secret for AD integration Azure Git Credentials and issue with namespace after Sync the app Nov 15, 2021
@JimFran JimFran changed the title Azure Git Credentials and issue with namespace after Sync the app Hot to add Azure Git Repo Credentials and issue with namespace after Sync the app Nov 15, 2021
@JimFran JimFran changed the title Hot to add Azure Git Repo Credentials and issue with namespace after Sync the app How to add Azure Git Repo Credentials and issue with namespace after Sync the app Nov 15, 2021
@JimFran JimFran changed the title How to add Azure Git Repo Credentials and issue with namespace after Sync the app Issue with namespace after Sync the app Nov 15, 2021
@JimFran JimFran closed this as completed Dec 7, 2021
@JimFran
Copy link
Author

JimFran commented Dec 7, 2021

The issue has been resolved using ApplicationSet. I did not find any way to use different namespaces with regular application files. ApplicationSet it's needed when using different namespaces.

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