Skip to content

Commit

Permalink
modify the deploy config
Browse files Browse the repository at this point in the history
  • Loading branch information
yxxchange committed Aug 8, 2023
1 parent ab65289 commit 53ef12f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 36 deletions.
30 changes: 2 additions & 28 deletions controllers/licenseissuer/deploy/manifests/customconfig.yaml.tmpl
Expand Up @@ -6,6 +6,8 @@ metadata:
stringData:
canConnectToExternalNetwork: "{{ .canConnectToExternalNetwork }}"
isMonitor: "{{ .enableMonitor }}"
MongoURI: "{{ .MongoURI }}"
PasswordSalt: "{{ .PasswordSalt }}"
---
apiVersion: v1
data:
Expand All @@ -28,31 +30,3 @@ kind: ConfigMap
metadata:
name: license-history
namespace: sealos-system
---
apiVersion: infostream.sealos.io/v1
kind: Launcher
metadata:
name: launcher
namespace: sealos-system
spec:
description: This YAML file is responsible for launching the entire cloud module.
name: Cloud-Launcher
---
apiVersion: batch/v1
kind: Job
metadata:
name: mongo-init-job
namespace: sealos-system
spec:
template:
spec:
containers:
- name: sealos-admin-preset
image: registry.cn-hangzhou.aliyuncs.com/fckc/job:v1.0.0
env:
- name: MONGO_URI
value: {{ .MongoURI }}
- name: PASSWORD_SALT
value: {{ .PasswordSalt }}
restartPolicy: Never
backoffLimit: 10
10 changes: 10 additions & 0 deletions controllers/licenseissuer/deploy/manifests/deploy.yaml
Expand Up @@ -609,6 +609,16 @@ spec:
secretKeyRef:
key: isMonitor
name: licenseissuer-env
- name: MONGO_URI
valueFrom:
secretKeyRef:
key: MongoURI
name: licenseissuer-env
- name: PASSWORD_SALT
valueFrom:
secretKeyRef:
key: PasswordSalt
name: licenseissuer-env
image: ghcr.io/labring/sealos-licenseissuer-controller:latest
livenessProbe:
httpGet:
Expand Down
9 changes: 1 addition & 8 deletions controllers/licenseissuer/deploy/manifests/setup.sh
Expand Up @@ -14,11 +14,4 @@ else
echo "Namespace sealos-system already exists. Skipping creation."
fi

kubectl apply -f manifests/deploy.yaml

while ! kubectl get crd | grep -q "launchers.infostream.sealos.io"; do
echo "Waiting for launchers.infostream.sealos.io CRD to be created..."
sleep 3
done

kubectl apply -f manifests/customconfig.yaml
kubectl apply -f manifests/deploy.yaml -f manifests/customconfig.yaml

0 comments on commit 53ef12f

Please sign in to comment.