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

Add alert for unlabelled tenant namespaces #162

Open
simu opened this issue Jun 14, 2023 · 0 comments
Open

Add alert for unlabelled tenant namespaces #162

simu opened this issue Jun 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@simu
Copy link
Member

simu commented Jun 14, 2023

Context

We currently deploy the following alerting rule through the hierarchy:

parameters:
  openshift4_monitoring:
    rules:
      appuio-cloud:
        alert:UnlabelledTenantNamespace:
          expr: 'sum by (namespace) (kube_namespace_labels{namespace!~"default|cilium|syn.*|openshift.*|appuio-.*|kube-.*",label_appuio_io_organization=""}) > 0'
          for: "1m"
          annotations:
            message: |-
              Tenant namespace {{ $labels.namespace }} doesn't have the `appuio.io/organization` label.

Note that the namespace regex matches the list of reserved namespaces in the component defaults. We should configure this alerting rules through the component, and exclude namespaces based on the contents of parameter reservedNamespaces, cf.

reservedNamespaces:
kubernetes: ["default", "kube-*"]
openshift: openshift-*
projectsyn: syn-*
appuio: appuio-*
cilium: cilium*

Alternatives

Keep the config in the hiearchy

@simu simu added the enhancement New feature or request label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant