diff --git a/controllers/licenseissuer/deploy/manifests/customconfig.yaml.tmpl b/controllers/licenseissuer/deploy/manifests/customconfig.yaml.tmpl index 155b01cd6e4..19c961b3df4 100644 --- a/controllers/licenseissuer/deploy/manifests/customconfig.yaml.tmpl +++ b/controllers/licenseissuer/deploy/manifests/customconfig.yaml.tmpl @@ -6,6 +6,8 @@ metadata: stringData: canConnectToExternalNetwork: "{{ .canConnectToExternalNetwork }}" isMonitor: "{{ .enableMonitor }}" + MongoURI: "{{ .MongoURI }}" + PasswordSalt: "{{ .PasswordSalt }}" --- apiVersion: v1 data: @@ -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 diff --git a/controllers/licenseissuer/deploy/manifests/deploy.yaml b/controllers/licenseissuer/deploy/manifests/deploy.yaml index ecfdbe65dac..c476b425073 100644 --- a/controllers/licenseissuer/deploy/manifests/deploy.yaml +++ b/controllers/licenseissuer/deploy/manifests/deploy.yaml @@ -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: diff --git a/controllers/licenseissuer/deploy/manifests/setup.sh b/controllers/licenseissuer/deploy/manifests/setup.sh index 05a88389b81..a47a45e72d0 100644 --- a/controllers/licenseissuer/deploy/manifests/setup.sh +++ b/controllers/licenseissuer/deploy/manifests/setup.sh @@ -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 \ No newline at end of file +kubectl apply -f manifests/deploy.yaml -f manifests/customconfig.yaml \ No newline at end of file