Skip to content

Commit

Permalink
Add labels and annotations for Topology view
Browse files Browse the repository at this point in the history
  • Loading branch information
williambelle committed Feb 26, 2025
1 parent 5a6e0ad commit 2b0d550
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
13 changes: 9 additions & 4 deletions ansible/roles/search-api-k8s/tasks/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,16 @@
name: '{{ app_name }}'
namespace: '{{ openshift_namespace }}'
labels:
app: '{{ app_name }}'
team: '{{ team }}'
version: '{{ tag }}'
app.kubernetes.io/component: 'backend'
app.kubernetes.io/managed-by: 'ansible'
app.kubernetes.io/name: '{{ app_name }}'
app.kubernetes.io/part-of: 'search'
app.kubernetes.io/version: '{{ tag }}'
app.openshift.io/runtime: 'nodejs'
annotations:
app.openshift.io/vcs-uri: 'https://github.com/epfl-si/search-api/'
app.openshift.io/vcs-ref: 'v{{ tag }}'
spec:
replicas: 2
strategy:
Expand All @@ -54,8 +61,6 @@
metadata:
labels:
app: '{{ app_name }}'
team: '{{ team }}'
version: '{{ tag }}'
spec:
serviceAccountName: '{{ app_name }}-service-account'
affinity:
Expand Down
13 changes: 9 additions & 4 deletions ansible/roles/search-api-k8s/tasks/haproxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,16 @@
name: '{{ app_name }}-haproxy'
namespace: '{{ openshift_namespace }}'
labels:
app: '{{ app_name }}'
team: '{{ team }}'
version: '{{ haproxy_tag }}'
app.kubernetes.io/component: 'backend'
app.kubernetes.io/managed-by: 'ansible'
app.kubernetes.io/name: '{{ app_name }}-haproxy'
app.kubernetes.io/part-of: 'tools'
app.kubernetes.io/version: '{{ haproxy_tag }}'
app.openshift.io/runtime: 'haproxy'
annotations:
app.openshift.io/vcs-uri: 'https://github.com/epfl-si/search-api/'
app.openshift.io/vcs-ref: 'v{{ tag }}'
spec:
replicas: 1
selector:
Expand All @@ -43,8 +50,6 @@
metadata:
labels:
app: '{{ app_name }}-haproxy'
team: '{{ team }}'
version: '{{ haproxy_tag }}'
spec:
serviceAccountName: '{{ app_name }}-haproxy-service-account'
containers:
Expand Down

0 comments on commit 2b0d550

Please sign in to comment.