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

Fix bytebase Dockerfile to support outside binary. #3116

Merged
merged 2 commits into from
May 23, 2023

Conversation

zzjin
Copy link
Collaborator

@zzjin zzjin commented May 23, 2023

πŸ€– Generated by Copilot at ce7aba4

Summary

πŸ³πŸš€πŸ› οΈ

This pull request updates the Bytebase controller to use a new image name, a multi-stage Dockerfile, and a Kubefile for deployment with the sealos tool. It also simplifies the API, improves the credential management, and reformats the YAML files. These changes enhance the functionality, usability, and security of the controller.

Sing, O Muse, of the mighty Bytebase controller,
That sealos built with skill and art divine,
Copying the bin/ and manifests folders,
And setting the image name with a new design.

Walkthrough

  • Replace the original Dockerfile with a new one that uses a multi-stage build and a distroless base image (link)
  • Remove the bin/ directory from the .dockerignore file to allow copying the binary from the bin/ directory in the new Dockerfile (link)
  • Update the image name in the kustomize configuration and the deployment manifest to match the new repository name sealos-db-bytebase-controller (link, link)
  • Add a new Kubefile to the deploy directory that defines how to deploy the controller using the sealos tool (link)
  • Add a new README.md file to the deploy directory that explains how to build and run the image using the sealos tool (link)
  • Add a new pre-deploy target to the Makefile that generates the deployment manifest from the kustomize configuration and saves it to the deploy/manifests/deploy.yaml.tmpl file (link)
  • Remove the externalURL field from the BytebaseSpec struct as it is no longer needed (link)
  • Add two new fields to the BytebaseStatus struct: loginCookie and rootPassword to store and retrieve the credentials for accessing the Bytebase API and database (link)
  • Reformat the YAML file in the deploy/manifests directory to wrap the long description lines (link)

Signed-off-by: zzjin <tczzjin@gmail.com>
@codecov
Copy link

codecov bot commented May 23, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (adc8cb7) 72.97% compared to head (59e31b8) 72.97%.

❗ Current head 59e31b8 differs from pull request most recent head ce7aba4. Consider uploading reports for the commit ce7aba4 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3116   +/-   ##
=======================================
  Coverage   72.97%   72.97%           
=======================================
  Files           8        8           
  Lines         618      618           
=======================================
  Hits          451      451           
  Misses        132      132           
  Partials       35       35           

β˜” View full report in Codecov by Sentry.
πŸ“’ Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: zzjin <tczzjin@gmail.com>
@zzjin zzjin merged commit 852b6a7 into labring:main May 23, 2023
31 checks passed
@@ -4,7 +4,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: ghcr.io/sealos-bytebase-controller
newName: ghcr.io/sealos-db-bytebase-controller
Copy link
Member

Choose a reason for hiding this comment

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

ghcr.io/labring/sealos-db-bytebase-controller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants