Skip to content

Commit

Permalink
add user env (labring#3469)
Browse files Browse the repository at this point in the history
* add cost-center env.

* add env for user controller
  • Loading branch information
lingdie committed Jul 6, 2023
1 parent 25f1921 commit 22b0d6c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions controllers/user/deploy/Kubefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ USER 65532:65532
COPY registry registry
COPY manifests manifests

ENV cloudDomain="cloud.example.io"
ENV cloudPort="6443"

CMD ["kubectl apply -f manifests/deploy.yaml","kubectl delete -f manifests/rbac.yaml --ignore-not-found=true","kubectl delete crd usergroups.user.sealos.io --ignore-not-found=true","kubectl delete crd usergroupbindings.user.sealos.io --ignore-not-found=true"]
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ spec:
apiVersion: v1
fieldPath: metadata.namespace
- name: SEALOS_CLOUD_HOST
value: cloud.sealos.io
value: {{ .cloudDomain }}
- name: SEALOS_CLOUD_PORT
value: "443"
value: "{{ .cloudPort }}"
image: ghcr.io/labring/sealos-user-controller:dev
imagePullPolicy: Always
livenessProbe:
Expand Down
4 changes: 3 additions & 1 deletion deploy/cloud/scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ function mock_tls {

function sealos_run_controller {
# run user controller
sealos run tars/user.tar
sealos run tars/user.tar \
--env cloudDomain=$cloudDomain \
--env cloudPort="6443"

# run terminal controller
sealos run tars/terminal.tar \
Expand Down

0 comments on commit 22b0d6c

Please sign in to comment.