Skip to content

Commit

Permalink
fixed some name issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AlxEnashi committed Aug 26, 2024
1 parent 44db937 commit 66e6112
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
13 changes: 7 additions & 6 deletions charts/lightcurve/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "service.fullname" . }}
name: {{ include "service.name" . }}
namespace: {{ .Values.namespace }}
data:
port: '{{ .Values.configmap.port }}'
Expand All @@ -11,25 +11,26 @@ data:
---
apiVersion: v1
metadata:
name: lightcurve-nginx-conf
name: {{ include "service.name" . }}-nginx-conf
namespace: {{ .Values.namespace }}
data:
default.conf: '{{ .Values.configmap.nginxConf }}'
default.conf: |
server {
listen 80;
location /v2/lightcurve/ {
location {{ .Values.ingress.path }}/ {
proxy_pass http://localhost:8000/;
proxy_redirect off;
proxy_set_header X-Forwarded-Prefix /v2/lightcurve/;
proxy_set_header X-Forwarded-Prefix {{ .Values.ingress.path }}/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
}
location /v2/lightcurve {
location {{ .Values.ingress.path }} {
proxy_pass http://localhost:8000/;
proxy_redirect off;
proxy_set_header X-Forwarded-Prefix /v2/lightcurve;
proxy_set_header X-Forwarded-Prefix {{ .Values.ingress.path }};
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
}
Expand Down
10 changes: 5 additions & 5 deletions charts/lightcurve/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "service.fullname" . }}
name: {{ include "service.name" . }}
namespace: {{ .Values.namespace }}
labels:
{{- include "service.labels" . | nindent 4 }}
Expand Down Expand Up @@ -35,17 +35,17 @@ spec:
- name: PORT
valueFrom:
configMapKeyRef:
name: {{ include "service.fullname" . }}
name: {{ include "service.name" . }}
key: port
- name: API_URL
valueFrom:
configMapKeyRef:
name: {{ include "service.fullname" . }}
name: {{ include "service.name" . }}
key: api-url
- name: SERVICE
valueFrom:
configMapKeyRef:
name: {{ include "service.fullname" . }}
name: {{ include "service.name" . }}
key: service
- name: PSQL_HOST
valueFrom:
Expand Down Expand Up @@ -122,7 +122,7 @@ spec:
volumes:
- name: nginx-conf
configMap:
name: lightcurve-nginx-conf
name: {{ include "service.name" . }}-nginx-conf
items:
- key: "default.conf"
path: "default.conf"
Expand Down
4 changes: 2 additions & 2 deletions charts/lightcurve/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "service.fullname" . }}
name: {{ include "service.name" . }}
namespace: {{ .Values.namespace }}
labels:
{{- include "service.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "service.fullname" . }}
name: {{ include "service.name" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
Expand Down
4 changes: 2 additions & 2 deletions charts/lightcurve/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ spec:
- host: {{ .Values.ingress.host }}
http:
paths:
- path: /v2/lightcurve
- path: {{ .Values.ingress.path }}
pathType: Prefix
backend:
service:
name: lightcurve
name: {{ include "service.name" . }}
port:
number: {{ .Values.service.port }}
2 changes: 1 addition & 1 deletion charts/lightcurve/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "service.fullname" . }}
name: {{ include "service.name" . }}
namespace: {{ .Values.namespace }}
labels:
{{- include "service.labels" . | nindent 4 }}
Expand Down
1 change: 1 addition & 0 deletions charts/lightcurve/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ ingress:
host: ""
k8sGroupName: ""
k8sTags: ""
path: "" # path without end /

secrets:
secretKey: ""
Expand Down

0 comments on commit 66e6112

Please sign in to comment.