diff --git a/argocd/applications/gitlab-staging/prometheus-application.yaml b/argocd/applications/gitlab-staging/prometheus-application.yaml index 4ca3f44..5a41537 100644 --- a/argocd/applications/gitlab-staging/prometheus-application.yaml +++ b/argocd/applications/gitlab-staging/prometheus-application.yaml @@ -1,77 +1,96 @@ # Declare the application to manage cert-manager apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: gitlab-staging-prometheus namespace: argocd spec: revisionHistoryLimit: 2 project: default source: chart: kube-prometheus-stack repoURL: https://prometheus-community.github.io/helm-charts targetRevision: v41.3.2 helm: releaseName: prometheus # The crds must be manually applied to avoid the following error: # one or more objects failed to apply, reason: CustomResourceDefinition.apiextensions.k8s.io "prometheuses.monitoring.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes # it should be possible to fix this error # The commands to run can be found on the operator page: # https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#from-33x-to-34x skipCrds: true values: | alertmanager: enabled: true # Temporary for tests grafana: enabled: true # Temporary before federation with pergamon service: port: 3000 type: LoadBalancer loadBalancerIP: 10.240.0.100 annotations: service.beta.kubernetes.io/azure-load-balancer-internal: "true" prometheus: service: annotations: type: LoadBalancer loadBalancerIP: 10.240.0.100 annotations: service.beta.kubernetes.io/azure-load-balancer-internal: "true" prometheusSpec: storageSpec: # Make the data persistent across the redeployments volumeClaimTemplate: spec: storageClassName: default resources: requests: storage: 10Gi podMonitorSelectorNilUsesHelmValues: false serviceMonitorSelectorNilUsesHelmValues: false - prometheusExternalLabelName: euwest-gitlab-staging + prometheusExternalLabelName: euwest_gitlab_staging externalLabels: environment: staging infrastructure: kubernetes domain: staging cluster: euwest-gitlab-staging + thanos: + # thanos-objstore-config-secret is installed in namespace cattle-monitoring-system + # see k8s-private-data:archive-production/thanos-objstore-config-secret.yaml. And + # https://prometheus-operator.dev/docs/operator/thanos/#configuring-thanos-object-storage + objectStorageConfig: + key: thanos.yaml + name: thanos-objstore-config-secret + # thanosServiceExternal: + # enable: false + # loadBalancerIP: 10.240.0.100 + thanosIngress: + enabled: true + ingressClassName: nginx + hosts: ["gitlab-staging-thanos.internal.softwareheritage.org"] + loadBalancerIP: 10.240.0.100 + pathType: Prefix + annotations: + kubernetes.io/tls-acme: "true" + nginx.ingress.kubernetes.io/backend-protocol: GRPC destination: server: https://192.168.200.13 namespace: monitoring syncPolicy: automated: prune: true selfHeal: true syncOptions: - RespectIgnoreDifferences=true ignoreDifferences: - group: '*' kind: Service name: prometheus-kube-prometheus-kube-controller-manager jqPathExpressions: - .metadata.labels."app.kubernetes.io/instance" - .spec.ports[] | select(.name == "http-metrics") - group: '*' kind: CustomResourceDefinition name: prometheuses.monitoring.coreos.com jqPathExpressions: - .metadata.annotations."controller-gen.kubebuilder.io/version" diff --git a/gitlab-staging/namespaces.yaml b/gitlab-staging/namespaces.yaml index 5c4fc4f..eb14293 100644 --- a/gitlab-staging/namespaces.yaml +++ b/gitlab-staging/namespaces.yaml @@ -1,15 +1,20 @@ --- apiVersion: v1 kind: Namespace metadata: name: gitlab-system --- apiVersion: v1 kind: Namespace metadata: name: cert-manager --- apiVersion: v1 kind: Namespace metadata: name: monitoring +--- +apiVersion: v1 +kind: Namespace +metadata: + name: ingress-nginx