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

Server ingress not setting ingressClassName once ArgoCD instance gets updated with the field #608

Open
slopezz opened this issue Sep 28, 2023 · 1 comment

Comments

@slopezz
Copy link

slopezz commented Sep 28, 2023

Describe the bug

We are using Red Hat OpenShift GitOps operator on stable channel,with automatic updates, exactly openshift-gitops-operator.v1.7.4.

Our ArgoCD instance uses the Ingress object in the spec.server config to publish the server.

We have just upgraded to OCP 4.12.33, and obtained a prometheus alert called IngressWithoutClassName, and the reason is that the ingress created by the openshift-gitops-operator was not setting the ingressClassName.

To resolve the alert, we have updated our ArgoCD instance to include the missing ingressClassName field:

apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
  name: argocd
spec:
  server:
    host: gitops.example.net
    ingress:
      annotations:
        cert-manager.io/cluster-issuer: letsencrypt-production
        external-dns.alpha.kubernetes.io/target: gitops.apps.example-cluster.example.net
      enabled: true
      ingressClassName: openshift-default  ## THIS
      tls:
        - hosts:
            - gitops.example.net
          secretName: gitops.example.net-cert
...

However, the ingress created by openshift-gitops-operator is not updated on the next operator reconcile:

kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-production
    external-dns.alpha.kubernetes.io/target: gitops.apps.example-cluster.example.net
  name: argocd-server
spec:
  tls:
    - hosts:
        - gitops.example.net
      secretName: gitops.example.net-cert
  rules:
    - host: gitops.example.net
      http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: argocd-server
                port:
                  name: http

Expected behavior

I would expect, that after adding the field spec.server.ingress.ingressClassName to the ArgoCD instance, openshift-gitops-operator would reconcile the Ingress and add the ingressClassName field to the Ingress resource:

kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-production
    external-dns.alpha.kubernetes.io/target: gitops.apps.example-cluster.example.net
  name: argocd-server
spec:
  ingressClassName: openshift-default   ## THIS
  tls:
    - hosts:
        - gitops.example.net
      secretName: gitops.example.net-cert
  rules:
    - host: gitops.example.net
      http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: argocd-server
                port:
                  name: http

Screenshots
image

Additional context
N/A

@reginapizza
Copy link
Contributor

Was able to reproduce this, made corresponding jira for this here: https://issues.redhat.com/browse/GITOPS-3412

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