fix(netbox) selectors didn't match labels

This commit is contained in:
Tommy 2024-02-03 10:53:28 +01:00
parent 16044d5773
commit 972f1f3aa7
No known key found for this signature in database
4 changed files with 10 additions and 27 deletions

View file

@ -4,7 +4,7 @@ description: |
An IP address management (IPAM) and data center infrastructure management (DCIM) tool. An IP address management (IPAM) and data center infrastructure management (DCIM) tool.
appVersion: v3.7.1 appVersion: v3.7.1
type: application type: application
version: 6.0.5 version: 6.0.6
maintainers: maintainers:
- name: Tommy Skaug - name: Tommy Skaug
email: tommy@skaug.me email: tommy@skaug.me

View file

@ -6,22 +6,17 @@ metadata:
name: {{ include "netbox.fullname" . }}-housekeeping name: {{ include "netbox.fullname" . }}-housekeeping
labels: labels:
{{- include "netbox.labels" . | nindent 4 }} {{- include "netbox.labels" . | nindent 4 }}
app.kubernetes.io/component: housekeeping
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ include "netbox.name" . }} app.kubernetes.io/component: {{ include "netbox.fullname" . }}-housekeeping
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: housekeeping
template: template:
metadata: metadata:
annotations: annotations:
checksum/config: {{ include (print $.Template.BasePath "/configuration.yaml") . | sha256sum }} checksum/config: {{ include (print $.Template.BasePath "/configuration.yaml") . | sha256sum }}
labels: labels:
app.kubernetes.io/name: {{ include "netbox.name" . }} app.kubernetes.io/component: {{ include "netbox.fullname" . }}-housekeeping
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: housekeeping
spec: spec:
containers: containers:
- name: {{ .Chart.Name }}-housekeeping - name: {{ .Chart.Name }}-housekeeping

View file

@ -5,24 +5,18 @@ kind: Deployment
metadata: metadata:
name: {{ include "netbox.fullname" . }}-worker name: {{ include "netbox.fullname" . }}-worker
labels: labels:
app.kubernetes.io/name: {{ include "netbox.name" . }} {{- include "netbox.labels" . | nindent 4 }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "netbox.chart" . }}
spec: spec:
replicas: {{ .Values.worker.replicaCount }} replicas: {{ .Values.worker.replicaCount }}
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ include "netbox.name" . }} app.kubernetes.io/component: {{ include "netbox.fullname" . }}-worker
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: worker
template: template:
metadata: metadata:
annotations: annotations:
checksum/config: {{ include (print $.Template.BasePath "/configuration.yaml") . | sha256sum }} checksum/config: {{ include (print $.Template.BasePath "/configuration.yaml") . | sha256sum }}
labels: labels:
{{- include "netbox.labels" . | nindent 8 }} app.kubernetes.io/component: {{ include "netbox.fullname" . }}-worker
app.kubernetes.io/component: worker
spec: spec:
containers: containers:
- name: {{ .Chart.Name }}-worker - name: {{ .Chart.Name }}-worker

View file

@ -2,26 +2,20 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "netbox.fullname" . }} name: {{ include "netbox.fullname" . }}-app
labels: labels:
app.kubernetes.io/name: {{ include "netbox.name" . }} {{- include "netbox.labels" . | nindent 4 }}
helm.sh/chart: {{ include "netbox.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec: spec:
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ include "netbox.name" . }} app.kubernetes.io/component: {{ include "netbox.fullname" . }}-app
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: app
template: template:
metadata: metadata:
annotations: annotations:
checksum/config: {{ include (print $.Template.BasePath "/configuration.yaml") . | sha256sum }} checksum/config: {{ include (print $.Template.BasePath "/configuration.yaml") . | sha256sum }}
labels: labels:
{{- include "netbox.labels" . | nindent 8 }} app.kubernetes.io/component: {{ include "netbox.fullname" . }}-app
app.kubernetes.io/component: app
spec: spec:
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}