Skip to content

Instantly share code, notes, and snippets.

@stevesloka
Last active June 22, 2023 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevesloka/e485b75f46264107617973d1152cb5b4 to your computer and use it in GitHub Desktop.
Save stevesloka/e485b75f46264107617973d1152cb5b4 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: argocd-server-http-ingress
namespace: argocd
annotations:
kubernetes.io/ingress.class: "contour"
ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
rules:
- http:
paths:
- backend:
serviceName: argocd-server
servicePort: http
host: argocd.example.com
tls:
- hosts:
- argocd.example.com
secretName: argocd-secret # do not change, this is provided by Argo CD
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: argocd-server-grpc-ingress
namespace: argocd
annotations:
kubernetes.io/ingress.class: "contour"
spec:
rules:
- http:
paths:
- backend:
serviceName: argocd-server
servicePort: https
host: grpc.argocd.example.com
tls:
- hosts:
- grpc.argocd.example.com
secretName: argocd-secret # do not change, this is provided by Argo CD
---
apiVersion: v1
kind: Service
metadata:
annotations:
projectcontour.io/upstream-protocol.h2c: "https,443"
labels:
app.kubernetes.io/component: server
app.kubernetes.io/instance: argocd
app.kubernetes.io/managed-by: pulumi
app.kubernetes.io/name: argocd-server
app.kubernetes.io/part-of: argocd
helm.sh/chart: argo-cd-2.7.0
name: argocd-server
namespace: infra
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: server
- name: https
port: 443
protocol: TCP
targetPort: server
selector:
app.kubernetes.io/instance: argocd
app.kubernetes.io/name: argocd-server
sessionAffinity: None
type: ClusterIP
@3deep5me
Copy link

Here is a Patch if you want to patch the Annotation on the default argocd manifest:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - https://github.com/argoproj/argo-cd/raw/v2.7.5/manifests/install.yaml
patches:
  # adds service annotation for grpc
  - target:
      kind: Service
      name: argocd-server
    patch: |-
      - op: add
        path: /metadata/annotations
        value:
          projectcontour.io/upstream-protocol.h2c: https,443

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment