Skip to content

Commit

Permalink
UPDATE: namescape and team
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremiahUy committed Aug 17, 2023
1 parent 3e925dc commit ce1c549
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
if: github.ref == 'refs/heads/master' && github.event_name != 'release'
strategy:
matrix:
cluster: ["dev-sbs", "dev-fss", "dev-gcp"]
cluster: ["dev-fss", "dev-gcp"]
steps:
- name: Checkout
uses: actions/checkout@master
Expand All @@ -47,7 +47,7 @@ jobs:
if: github.event_name == 'release'
strategy:
matrix:
cluster: ["prod-sbs", "prod-fss", "prod-gcp"]
cluster: ["prod-fss", "prod-gcp"]
steps:
- name: Checkout
uses: actions/checkout@master
Expand Down
23 changes: 23 additions & 0 deletions .nais/alerts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: "nais.io/v1"
kind: "Alert"
metadata:
name: topic-collector
namespace: dataplattform
labels:
team: dataplattform
spec:
receivers:
slack:
channel: '#nada-airflow-alerts'
prependText: '<!here> | '
alerts:
- alert: ingress-collector stream restarts too often
expr: increase(ingress_collector_counter_k8s_stream_timeout_total[5m])>10
for: 1m
description: "{{ $labels.app }} stream restarts to often in namespace {{ $labels.kubernetes_namespace }}"
action: "`kubectl logs {{ $labels.kubernetes_pod_name }} -n {{ $labels.kubernetes_namespace }}`"
- alert: ingress-collector pod restarts too often
expr: increase(kube_pod_container_status_restarts_total{container="ingress-collector", namespace="dataplattform"}[20m])>10
for: 1m
description: "{{ $labels.app }} pod restarts to often in namespace {{ $labels.kubernetes_namespace }}"
action: "`kubectl describe pod {{ $labels.kubernetes_pod_name }} -n {{ $labels.kubernetes_namespace }}` for events, and `kubectl logs {{ $labels.kubernetes_pod_name }} -n {{ $labels.kubernetes_namespace }}` for logs"
34 changes: 5 additions & 29 deletions .nais/nais.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: "nais.io/v1alpha1"
kind: "Application"
metadata:
labels:
team: dataplattform
team: team-researchops
name: ingress-collector
namespace: dataplattform
namespace: team-researchops
spec:
image: {{ image }}
port: 8000
Expand Down Expand Up @@ -47,13 +47,13 @@ spec:
- name: SSL_CERT_FILE
value: /etc/pki/tls/certs/ca-bundle.crt
- name: KAFKA_TOPIC
value: dataplattform.ingress-topic-v2
value: team-researchops.ingress-topic-v2
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: ingress-collector-apiserver
namespace: dataplattform
namespace: team-researchops
spec:
egress:
- to:
Expand All @@ -63,28 +63,4 @@ spec:
matchLabels:
app: ingress-collector
policyTypes:
- Egress
---
apiVersion: "nais.io/v1"
kind: "Alert"
metadata:
name: topic-collector
namespace: dataplattform
labels:
team: dataplattform
spec:
receivers:
slack:
channel: '#nada-airflow-alerts'
prependText: '<!here> | '
alerts:
- alert: ingress-collector stream restarts too often
expr: increase(ingress_collector_counter_k8s_stream_timeout_total[5m])>10
for: 1m
description: "{{ $labels.app }} stream restarts to often in namespace {{ $labels.kubernetes_namespace }}"
action: "`kubectl logs {{ $labels.kubernetes_pod_name }} -n {{ $labels.kubernetes_namespace }}`"
- alert: ingress-collector pod restarts too often
expr: increase(kube_pod_container_status_restarts_total{container="ingress-collector", namespace="dataplattform"}[20m])>10
for: 1m
description: "{{ $labels.app }} pod restarts to often in namespace {{ $labels.kubernetes_namespace }}"
action: "`kubectl describe pod {{ $labels.kubernetes_pod_name }} -n {{ $labels.kubernetes_namespace }}` for events, and `kubectl logs {{ $labels.kubernetes_pod_name }} -n {{ $labels.kubernetes_namespace }}` for logs"
- Egress
16 changes: 5 additions & 11 deletions .nais/topic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: kafka.nais.io/v1
kind: Topic
metadata:
name: ingress-topic-v2
namespace: dataplattform
namespace: team-researchops
labels:
team: dataplattform
team: team-researchops
spec:
pool: nav-infrastructure
config: # optional; all fields are optional too; defaults shown
Expand All @@ -15,15 +15,9 @@ spec:
retentionBytes: -1
retentionHours: 72
acl:
- team: dataplattform
- team: team-researchops
application: ingress-collector
access: write
- team: dataplattform
- team: team-researchops
application: amplitude-proxy
access: read
- team: dataplattform
application: dekoratoren-bigquery
access: read
- team: dataplattform
application: dakan-ingress-indexer
access: read
access: read

0 comments on commit ce1c549

Please sign in to comment.