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" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
com.digitalocean.netbox/component: api
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
com.digitalocean.netbox/component: api
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
|
@ -24,7 +22,6 @@ spec:
|
|||
labels:
|
||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
com.digitalocean.netbox/component: api
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
|
@ -35,19 +32,6 @@ spec:
|
|||
name: {{ include "netbox.fullname" . }}
|
||||
- secretRef:
|
||||
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:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- if or .Values.persistence.enabled .Values.extraVolumeMounts }}
|
||||
|
@ -80,11 +64,13 @@ spec:
|
|||
containerPort: 8080
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
httpGet:
|
||||
port: http
|
||||
path: /
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
httpGet:
|
||||
port: http
|
||||
path: /
|
||||
volumeMounts:
|
||||
- name: netbox-config-files
|
||||
mountPath: /etc/netbox-nginx/nginx.conf
|
||||
|
|
|
@ -38,6 +38,10 @@ data:
|
|||
server_tokens off;
|
||||
client_max_body_size 10M;
|
||||
|
||||
upstream netbox {
|
||||
server unix:/tmp/netbox/gunicorn.sock fail_timeout=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
access_log off;
|
||||
|
@ -47,7 +51,7 @@ data:
|
|||
}
|
||||
|
||||
location / {
|
||||
proxy_pass unix:/tmp/netbox/gunicorn.sock;
|
||||
proxy_pass http://netbox;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
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:
|
||||
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
com.digitalocean.netbox/component: front
|
Loading…
Reference in a new issue