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

fix(chart): block /metrics on staging alb #2813

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

rtrompier
Copy link
Collaborator

No description provided.

@rtrompier rtrompier requested a review from severo May 15, 2024 19:59
Copy link

ArgoCD Diff for commit 4929bce

Updated at 5/15/2024, 10:00:24 PM CEST

App: datasets-server-prod
YAML generation: Success 🟢
App sync status: Out of Sync ⚠️

===== networking.k8s.io/Ingress datasets-server/prod-datasets-server-api ======
--- /tmp/argocd-diff3945221479/prod-datasets-server-api-live.yaml	2024-05-15 20:00:23.646832335 +0000
+++ /tmp/argocd-diff3945221479/prod-datasets-server-api	2024-05-15 20:00:23.646832335 +0000
@@ -0,0 +1,51 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  annotations:
+    alb.ingress.kubernetes.io/actions.metrics-unauthorized: '{"type":"fixed-response","fixedResponseConfig":{"contentType":"text/plain","statusCode":"401","messageBody":"401
+      Unauthorized"}}'
+    alb.ingress.kubernetes.io/actions.openapi-redirect: '{"Type":"redirect","RedirectConfig":{"Host":"raw.githubusercontent.com","Path":"/huggingface/dataset-viewer/main/docs/source/openapi.json","Port":"443","Protocol":"HTTPS","Query":"#{query}","StatusCode":"HTTP_307"}}'
+    alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-1:707930574880:certificate/971187a3-2baa-40e5-bcae-94d6ec55cd24
+    alb.ingress.kubernetes.io/group.name: datasets-server
+    alb.ingress.kubernetes.io/group.order: "100"
+    alb.ingress.kubernetes.io/healthcheck-path: /healthcheck
+    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80, "HTTPS": 443}]'
+    alb.ingress.kubernetes.io/load-balancer-name: hub-datasets-server-prod
+    alb.ingress.kubernetes.io/scheme: internet-facing
+    alb.ingress.kubernetes.io/tags: Env=prod,Project=datasets-server,Terraform=true
+    alb.ingress.kubernetes.io/target-node-labels: role-datasets-server-api=true
+    kubernetes.io/ingress.class: alb
+  labels:
+    app.kubernetes.io/component: prod-datasets-server-api
+    app.kubernetes.io/instance: prod
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: prod-datasets-server
+    argocd.argoproj.io/instance: datasets-server-prod
+    helm.sh/chart: datasets-server
+  name: prod-datasets-server-api
+  namespace: datasets-server
+spec:
+  rules:
+  - host: datasets-server.huggingface.co
+    http:
+      paths:
+      - backend:
+          service:
+            name: prod-datasets-server-api
+            port:
+              name: http
+        path: /
+        pathType: Prefix
+      - backend:
+          serviceName: openapi-redirect
+          servicePort: use-annotation
+        path: /openapi.json
+        pathType: Exact
+      - backend:
+          serviceName: metrics-unauthorized
+          servicePort: use-annotation
+        path: /metrics
+        pathType: Exact
+  tls:
+  - hosts:
+    - datasets-server.huggingface.co

App: datasets-server-staging
YAML generation: Success 🟢
App sync status: Synced ✅

===== networking.k8s.io/Ingress datasets-server/staging-datasets-server-api ======
--- /tmp/argocd-diff79542507/staging-datasets-server-api-live.yaml	2024-05-15 20:00:24.214841857 +0000
+++ /tmp/argocd-diff79542507/staging-datasets-server-api	2024-05-15 20:00:24.214841857 +0000
@@ -2,6 +2,9 @@
 kind: Ingress
 metadata:
   annotations:
+    alb.ingress.kubernetes.io/actions.metrics-unauthorized: '{"type":"fixed-response","fixedResponseConfig":{"contentType":"text/plain","statusCode":"401","messageBody":"401
+      Unauthorized"}}'
+    alb.ingress.kubernetes.io/actions.openapi-redirect: '{"Type":"redirect","RedirectConfig":{"Host":"raw.githubusercontent.com","Path":"/huggingface/dataset-viewer/main/docs/source/openapi.json","Port":"443","Protocol":"HTTPS","Query":"#{query}","StatusCode":"HTTP_307"}}'
     alb.ingress.kubernetes.io/group.name: datasets-server
     alb.ingress.kubernetes.io/group.order: "100"
     alb.ingress.kubernetes.io/healthcheck-path: /healthcheck
@@ -88,6 +91,16 @@
               name: http
         path: /
         pathType: Prefix
+      - backend:
+          serviceName: openapi-redirect
+          servicePort: use-annotation
+        path: /openapi.json
+        pathType: Exact
+      - backend:
+          serviceName: metrics-unauthorized
+          servicePort: use-annotation
+        path: /metrics
+        pathType: Exact
   tls:
   - hosts:
     - datasets-server.us.dev.moon.huggingface.tech

Legend Status
The app is synced in ArgoCD, and diffs you see are solely from this PR.
⚠️ The app is out-of-sync in ArgoCD, and the diffs you see include those changes plus any from this PR.
🛑 There was an error generating the ArgoCD diffs due to changes in this PR.

@severo severo merged commit 3133635 into main May 15, 2024
2 checks passed
@severo severo deleted the fix/block-metrics-staging branch May 15, 2024 20:04
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

Successfully merging this pull request may close these issues.

None yet

2 participants