Skip to content

Commit

Permalink
update: charts
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhnajafiz committed Jun 24, 2024
1 parent 75125bd commit 92046d1
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 65 deletions.
63 changes: 0 additions & 63 deletions deployments/caaas/templates/deployment.yaml

This file was deleted.

66 changes: 65 additions & 1 deletion deployments/caaas/templates/replicaset.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: {{ .Release.Name }}-replicaset
name: {{ .Release.Name }}-gateway
namespace: {{ .Release.Namespace }}
annotations: {}
labels:
Expand Down Expand Up @@ -49,3 +49,67 @@ spec:
configMap:
name: {{ .Release.Name }}-configmap
restartPolicy: Never
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: {{ .Release.Name }}-api
namespace: {{ .Release.Namespace }}
annotations: {}
labels:
{{ toYaml .Values.caaas.labels | default "{}" }}
spec:
replicas: 1
selector:
matchLabels:
caaas.application.type: api
{{ toYaml .Values.caaas.labels | default "{}" }}
template:
metadata:
labels:
caaas.application.type: api
{{ toYaml .Values.caaas.labels | default "{}" }}
spec:
initContainers:
- name: migrate-container
imagePullPolicy: {{ .Values.caaas.image.pullPolicy }}
image: {{ .Values.caaas.image.repository }}:{{ .Values.caaas.image.tag }}
env:
- name: CAAAS_MODE
value: "migrate"
volumeMounts:
- name: configmap-file
mountPath: "/usr/share/caass/config.yaml"
subPath: "config.yaml"
readOnly: true
containers:
- name: api-container
imagePullPolicy: {{ .Values.caaas.image.pullPolicy }}
image: {{ .Values.caaas.image.repository }}:{{ .Values.caaas.image.tag }}
env:
- name: CAAAS_MODE
value: "api"
ports:
- name: http
containerPort: {{ .Values.caaas.configs.http_server_port }}
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: http
readinessProbe:
httpGet:
path: /healthz
port: http
resources:
{{- toYaml .Values.caaas.resources.gateway | nindent 10 }}
volumeMounts:
- name: configmap-file
mountPath: "/usr/share/caass/config.yaml"
subPath: "config.yaml"
readOnly: true
volumes:
- name: configmap-file
configMap:
name: {{ .Release.Name }}-configmap
restartPolicy: Never
2 changes: 1 addition & 1 deletion internal/handlers/api/v2/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (h Handler) removeRoleFromUser(c echo.Context) error {
func (h Handler) removeRole(c echo.Context) error {
role := c.QueryParam("role")

// remove a group
// remove a role
if err := h.Ctl.RemoveRole(role); err != nil {
h.Logger.Error("failed to remove a role", zap.String("role", role), zap.Error(err))

Expand Down

0 comments on commit 92046d1

Please sign in to comment.