Clean up and remove old service definition
This commit is contained in:
parent
777a573b0b
commit
553662ad34
4 changed files with 9 additions and 41 deletions
|
@ -8,14 +8,12 @@ metadata:
|
||||||
helm.sh/chart: {{ include "netbox.chart" . }}
|
helm.sh/chart: {{ include "netbox.chart" . }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
com.digitalocean.netbox/component: api
|
|
||||||
spec:
|
spec:
|
||||||
replicas: {{ .Values.replicaCount }}
|
replicas: {{ .Values.replicaCount }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
com.digitalocean.netbox/component: api
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
|
@ -24,7 +22,6 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
com.digitalocean.netbox/component: api
|
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
|
@ -35,19 +32,6 @@ spec:
|
||||||
name: {{ include "netbox.fullname" . }}
|
name: {{ include "netbox.fullname" . }}
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ include "netbox.fullname" . }}
|
name: {{ include "netbox.fullname" . }}
|
||||||
# livenessProbe:
|
|
||||||
# httpGet:
|
|
||||||
# path: /
|
|
||||||
# port: api
|
|
||||||
# initialDelaySeconds: 50
|
|
||||||
# failureThreshold: 5
|
|
||||||
readinessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: api
|
|
||||||
ports:
|
|
||||||
- name: api
|
|
||||||
containerPort: 8001
|
|
||||||
protocol: TCP
|
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
{{- if or .Values.persistence.enabled .Values.extraVolumeMounts }}
|
{{- if or .Values.persistence.enabled .Values.extraVolumeMounts }}
|
||||||
|
@ -80,11 +64,13 @@ spec:
|
||||||
containerPort: 8080
|
containerPort: 8080
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
tcpSocket:
|
httpGet:
|
||||||
port: http
|
port: http
|
||||||
|
path: /
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
httpGet:
|
||||||
port: http
|
port: http
|
||||||
|
path: /
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: netbox-config-files
|
- name: netbox-config-files
|
||||||
mountPath: /etc/netbox-nginx/nginx.conf
|
mountPath: /etc/netbox-nginx/nginx.conf
|
||||||
|
|
|
@ -38,6 +38,10 @@ data:
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
client_max_body_size 10M;
|
client_max_body_size 10M;
|
||||||
|
|
||||||
|
upstream netbox {
|
||||||
|
server unix:/tmp/netbox/gunicorn.sock fail_timeout=0;
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8080;
|
listen 8080;
|
||||||
access_log off;
|
access_log off;
|
||||||
|
@ -47,7 +51,7 @@ data:
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass unix:/tmp/netbox/gunicorn.sock;
|
proxy_pass http://netbox;
|
||||||
proxy_set_header X-Forwarded-Host $http_host;
|
proxy_set_header X-Forwarded-Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{ include "netbox.fullname" . }}-api
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
|
||||||
helm.sh/chart: {{ include "netbox.chart" . }}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
||||||
com.digitalocean.netbox/component: api
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
ports:
|
|
||||||
- port: 8001
|
|
||||||
targetPort: api
|
|
||||||
protocol: TCP
|
|
||||||
name: api
|
|
||||||
selector:
|
|
||||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
com.digitalocean.netbox/component: api
|
|
|
@ -18,4 +18,3 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
com.digitalocean.netbox/component: front
|
|
Loading…
Reference in a new issue