diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9173cc0bd02..32f3e69d1c1 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,6 @@ on: - "service/**" - "webhooks/**" - "frontend/**" - - "deploy/cloud/manifests/free-license.yaml" pull_request: branches: [ "*" ] paths-ignore: diff --git a/controllers/licenseissuer/deploy/Kubefile b/controllers/licenseissuer/deploy/Kubefile index ec9c7332f6b..b8cbf41c0df 100644 --- a/controllers/licenseissuer/deploy/Kubefile +++ b/controllers/licenseissuer/deploy/Kubefile @@ -7,10 +7,10 @@ COPY manifests manifests ENV canConnectToExternalNetwork "true" ENV enableMonitor "true" -ENV CollectorURL "https://license.sealos.io/collector", -ENV NotificationURL "https://license.sealos.io/notify", -ENV RegisterURL "https://license.sealos.io/register", -ENV CloudSyncURL "https://license.sealos.io/datasync", +ENV CollectorURL "https://license.sealos.io/collector" +ENV NotificationURL "https://license.sealos.io/notify" +ENV RegisterURL "https://license.sealos.io/register" +ENV CloudSyncURL "https://license.sealos.io/datasync" ENV LicenseMonitorURL "https://license.sealos.io/license" CMD ["kubectl apply -f manifests/customconfig.yaml -f manifests/deploy.yaml"] diff --git a/controllers/licenseissuer/deploy/manifests/customconfig.yaml.tmpl b/controllers/licenseissuer/deploy/manifests/customconfig.yaml.tmpl index ac7ca1cdba7..c0a2dfe78b7 100644 --- a/controllers/licenseissuer/deploy/manifests/customconfig.yaml.tmpl +++ b/controllers/licenseissuer/deploy/manifests/customconfig.yaml.tmpl @@ -11,13 +11,29 @@ apiVersion: v1 data: config.json: | { - "CollectorURL": {{ .CollectorURL }}, - "NotificationURL": {{ .NotificationURL }}, - "RegisterURL": {{ .RegisterURL }}, - "CloudSyncURL": {{ .CloudSyncURL }}, - "LicenseMonitorURL": {{ .LicenseMonitorURL }} + "CollectorURL": "{{ .CollectorURL }}", + "NotificationURL": "{{ .NotificationURL }}", + "RegisterURL": "{{ .RegisterURL }}", + "CloudSyncURL": "{{ .CloudSyncURL }}", + "LicenseMonitorURL": "{{ .LicenseMonitorURL }}" } kind: ConfigMap metadata: name: url-config namespace: sealos-system +--- +apiVersion: v1 +data: null +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 diff --git a/controllers/licenseissuer/deploy/manifests/deploy.yaml b/controllers/licenseissuer/deploy/manifests/deploy.yaml index 7c8bf8264b1..3fe2071346a 100644 --- a/controllers/licenseissuer/deploy/manifests/deploy.yaml +++ b/controllers/licenseissuer/deploy/manifests/deploy.yaml @@ -583,7 +583,7 @@ spec: resources: limits: cpu: 500m - memory: 128Mi + memory: 64Mi requests: cpu: 5m memory: 64Mi @@ -609,7 +609,7 @@ spec: secretKeyRef: key: isMonitor name: licenseissuer-env - image: registry.cn-hangzhou.aliyuncs.com/fckc/cloud-controller:v3.3.5 + image: ghcr.io/labring/sealos-licenseissuer-controller:latest livenessProbe: httpGet: path: /healthz @@ -629,7 +629,7 @@ spec: memory: 1024Mi requests: cpu: 10m - memory: 512Mi + memory: 128Mi securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/controllers/pkg/crypto/crypto_test.go b/controllers/pkg/crypto/crypto_test.go index 43db04170a7..d5bec5de33b 100644 --- a/controllers/pkg/crypto/crypto_test.go +++ b/controllers/pkg/crypto/crypto_test.go @@ -8,7 +8,7 @@ import ( v1 "github.com/labring/sealos/controllers/licenseissuer/api/v1" ) -const Token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJTZWFsb3MiLCJpYXQiOjE2ODkxNDYyOTAsImFtdCI6NTAwMCwibm9kIjoxLCJ0dGUiOjMwfQ.lj1IYb_6vvWfYiLhm3DRpjAu4E3SsjWR9TA09ynB09HXx5Qa3FNXSE-kmpccjhn-lZd0miDwAEVxLDLNhFCGnrqMsSCAlwIK_ymoCSl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Xc2eHB6ZHZrdi9uSApmZmxsWGZVNDNyRGdQaGkwZDRjWnNuTUJlazUxQkNiRFRuSHlNVFdGT1RoTjc1VVM0bzJxRm9JSEhsM0N0RzE4ClZIZEdRSE1IR0dYcGN3bVhhck1EQndwVWFOSk9kMkhjTTB5dlZEY2xDZzRITkIwVUFWeFNweFlRV3BwNWJzN2gKbHdJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==" func TestIsLicenseValid(t *testing.T) { diff --git a/deploy/cloud/manifests/free-license.yaml b/deploy/cloud/manifests/free-license.yaml index fad8c4292ae..5a15310b2da 100644 --- a/deploy/cloud/manifests/free-license.yaml +++ b/deploy/cloud/manifests/free-license.yaml @@ -1,3 +1,4 @@ +# nosemgrep: generic.secrets.security.detected-jwt-token.detected-jwt-token apiVersion: infostream.sealos.io/v1 kind: License metadata: diff --git a/deploy/cloud/scripts/init.sh b/deploy/cloud/scripts/init.sh index 5e58dda0ac6..df2a25cf19b 100644 --- a/deploy/cloud/scripts/init.sh +++ b/deploy/cloud/scripts/init.sh @@ -148,12 +148,12 @@ function install { # sealos run controllers sealos_run_controller + + # sealos run frontends + sealos_run_frontend # sealos authorize sealos_authorize - - # sealos run frontends - sealos_run_frontend } install