Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adapt license for poc #3594

Merged
merged 6 commits into from Jul 31, 2023
Merged

feat: adapt license for poc #3594

merged 6 commits into from Jul 31, 2023

Conversation

yxxchange
Copy link
Contributor

@yxxchange yxxchange commented Jul 27, 2023

πŸ€– Generated by Copilot at dfdccdc

Summary

βœ¨πŸ”§πŸ”¨

Added support for free license feature in sealos. This involved removing license expiration check, moving license recharge logic, creating admin user and free license resources, and applying them to the cluster.

admin-user, license
New YAML manifests for Sealos
Free in the springtime

Walkthrough

  • Remove license expiration check logic from Reconcile function of LicenseReconciler struct (link,link)
  • Move license recharge logic to execute after verifying license signature in Reconcile function of LicenseReconciler struct (link)
  • Add empty line to controller package for readability and formatting (link)
  • Add User resource named admin with custom CSR expiration time to admin-user.yaml file in deploy/cloud/manifests directory (link)
  • Add License resource named license with token containing free license for admin user to free-license.yaml file in deploy/cloud/manifests directory (link)
  • Apply admin-user.yaml and free-license.yaml manifests to Kubernetes cluster in init.sh script in deploy/cloud/scripts directory (link)

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Jul 27, 2023

πŸ€– Generated by lychee action

Summary

Status Count
πŸ” Total 914
βœ… Successful 347
⏳ Timeouts 0
πŸ”€ Redirected 0
πŸ‘» Excluded 566
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (9a013ce) 67.92% compared to head (4def4c5) 67.92%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3594   +/-   ##
=======================================
  Coverage   67.92%   67.92%           
=======================================
  Files           8        8           
  Lines         664      664           
=======================================
  Hits          451      451           
  Misses        171      171           
  Partials       42       42           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@yxxchange yxxchange force-pushed the license-poc branch 5 times, most recently from 8875f01 to e8ae68a Compare July 28, 2023 09:25
@lingdie lingdie changed the title License poc feat: adapt license for poc Jul 30, 2023
@@ -24,6 +24,7 @@ on:
- "service/**"
- "webhooks/**"
- "frontend/**"
- "deploy/cloud/manifests/free-license.yaml"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why add this?

@@ -609,7 +609,7 @@ spec:
secretKeyRef:
key: isMonitor
name: licenseissuer-env
image: ghcr.io/labring/sealos-licenseissuer-controller:latest
image: registry.cn-hangzhou.aliyuncs.com/fckc/cloud-controller:v3.3.5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not use personal registry.


# wait for admin-user ready
echo "waiting for admin-user generated"
sleep 3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use while to make sure.

@@ -0,0 +1,7 @@
apiVersion: infostream.sealos.io/v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add // nosemgrep: generic.secrets.security.detected-jwt-token.detected-jwt-token to ingore semgrep ci .

@yxxchange yxxchange requested a review from bxy4543 July 31, 2023 10:11
@bxy4543 bxy4543 merged commit b695e99 into labring:main Jul 31, 2023
62 of 63 checks passed
@yxxchange yxxchange deleted the license-poc branch July 31, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants