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

[Suggestion] Remove the hard coded ingress yaml resources to use instead a helm chart deployed using argoCD #34

Closed
cmoulliard opened this issue Oct 17, 2023 · 2 comments

Comments

@cmoulliard
Copy link
Contributor

Suggestion

Remove the hard coded ingress yaml resources to use instead a helm chart deployed using argoCD

How to reproduce

  • Remove as embedApps -> ingress-nginx here
  • Run make
  • Create a new cluster ./idpbuilder create --buildName local --recreate
  • Create a helm values file and deploy the ingress controller helm chart
cat <<EOF > values.yaml
controller:
  allowSnippetAnnotations: true
  service:
    type: NodePort
  hostPort:
    # Use host ports 80 and 443
    enabled: true
  watchIngressWithoutClass: true
  extraArgs:
    enable-ssl-passthrough: ""
  nodeSelector:
    # This selector is needed as it has been declared as kind kubeletExtraArgs => node-labels: "ingress-ready=true"
    ingress-ready: "true"
  tolerations:
    - effect: NoSchedule
      key: node-role.kubernetes.io/master
      operator: Equal
    - effect: NoSchedule
      key: node-role.kubernetes.io/control-plane
      operator: Equal
EOF

helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx  --create-namespace -f values.yaml
  • Check in your browser that you can access the argoCD UI: https://argocd.idpbuilder.cnoe.io.local:8443/

Next step

Replace the Helm command with an Application CR. Something like (NOT TESTED):

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: ingress-nginx-helm
  namespace: argocd
spec:
  destination:
    namespace: ingress-nginx
    server: "https://kubernetes.default.svc"
  source:
    chart: ingress-nginx
    repoURL: https://kubernetes.github.io/ingress-nginx
    targetRevision: 4.8.2
    helm:
      releaseName: ingress-nginx
      values: |
        controller:
          allowSnippetAnnotations: true
          service:
            type: NodePort
          hostPort:
            # Use host ports 80 and 443
            enabled: true
          watchIngressWithoutClass: true
          extraArgs:
            enable-ssl-passthrough: ""
          nodeSelector:
            # This selector is needed as it has been declared as kind kubeletExtraArgs => node-labels: "ingress-ready=true"
            ingress-ready: "true"
          tolerations:
            - effect: NoSchedule
              key: node-role.kubernetes.io/master
              operator: Equal
            - effect: NoSchedule
              key: node-role.kubernetes.io/control-plane
              operator: Equal
  project: idpbuilder-embedded-gitserver
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
@nimakaviani
Copy link
Contributor

yeah, this aligns well with the previous conversation in using Argo Apps for anything other than Argo CD and Argo Workflows that needs to be installed.

@nabuskey
Copy link
Collaborator

This is not feasible in the current state because we need to modify elements within manifests and we cannot render helm charts. We can discuss doing something like this in the future but it would be a major change.

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

3 participants