Skip to content

Commit

Permalink
Merge pull request #6 from TheLunarCompany/core-1214-raise-kubernetes…
Browse files Browse the repository at this point in the history
…-environment-for-tests

Change resources to quotas
  • Loading branch information
d-goro authored Sep 29, 2024
2 parents f5ce1fc + 8dc0192 commit 07401b4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions charts/lunar-proxy/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ immutable: false
apiVersion: v1
kind: ConfigMap
metadata:
name: resources
name: quotas
namespace: {{ default .Release.Namespace }}
labels:
app: "{{ include "lunar-proxy.fullname" . }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
data:
{{- range $key, $value := .Values.resources }}
{{- range $key, $value := .Values.quotas }}
{{ $key }}: |
{{ $value | nindent 4 }}
{{- end }}
Expand Down
10 changes: 5 additions & 5 deletions charts/lunar-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
path: {{include "lunar-proxy.healthcheck.path" .}}
port: {{include "lunar-proxy.healthcheck.port" .}}
resources:
{{- toYaml .Values.containerResources | nindent 12 }}
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
Expand Down Expand Up @@ -108,8 +108,8 @@ spec:
{{- if .Values.lunarStreamsEnabled }}
- mountPath: /etc/lunar-proxy/flows
name: flows
- mountPath: /etc/lunar-proxy/resources
name: resources
- mountPath: /etc/lunar-proxy/quotas
name: quotas
{{- else }}
- mountPath: /etc/lunar-proxy
name: policies
Expand All @@ -132,8 +132,8 @@ spec:
name: flows
name: flows
- configMap:
name: resources
name: resources
name: quotas
name: quotas
{{- else }}
- configMap:
items:
Expand Down
6 changes: 3 additions & 3 deletions charts/lunar-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: "lunar-proxy"

containerResources:
resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down Expand Up @@ -154,7 +154,7 @@ policies:
file_dir: "/var/log/lunar-proxy"
file_name: "output.log"

# ==== Example of flows and resources: ====
# ==== Example of flows and quotas: ====
# flows:
# rate_limit_flow.yaml: |
# name: RateLimitFlow
Expand Down Expand Up @@ -234,7 +234,7 @@ policies:
# name: globalStream
# at: end

# resources:
# quotas:
# rate_limit_quota.yaml: |
# quota:
# id: MyLimitResource
Expand Down

0 comments on commit 07401b4

Please sign in to comment.