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: change dockerfile #491

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

feat: change dockerfile #491

wants to merge 4 commits into from

Conversation

yuyicai
Copy link
Member

@yuyicai yuyicai commented Mar 23, 2025

No description provided.

@yuyicai yuyicai force-pushed the dockerfile branch 2 times, most recently from f7b5b46 to 6fc2a09 Compare March 23, 2025 14:47
yuyicai added 2 commits March 26, 2025 10:51
Signed-off-by: yuyicai <yuyicai@hotmail.com>
Signed-off-by: yuyicai <yuyicai@hotmail.com>
@yuyicai yuyicai requested review from wencaiwulue and Copilot March 28, 2025 06:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Docker-related configuration and removes deprecated kubeconfig assignment in tests.

  • Removed unused kubeconfig assignment from test initialization in pkg/handler/function_test.go.
  • Updated the CI workflow by removing Docker Hub login and docker buildx creation steps to align with the new Dockerfile changes.

Reviewed Changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.

File Description
pkg/handler/function_test.go Removed kubeconfig assignment that was setting the default path.
.github/workflows/test.yml Removed Docker Hub login and buildx creation to update Docker usage.
Files not reviewed (3)
  • Makefile: Language not supported
  • build/Dockerfile: Language not supported
  • build/test.Dockerfile: Language not supported
Comments suppressed due to low confidence (3)

pkg/handler/function_test.go:466

  • Ensure that the removal of setting configFlags.KubeConfig does not result in unexpected behavior in locating the kubeconfig file for restconfig initialization. If this change is intentional, verify that the tests run correctly in environments without a preset KUBECONFIG.
configFlags.KubeConfig = &clientcmd.RecommendedHomeFile

.github/workflows/test.yml:20

  • Confirm that removing the Docker Hub login step does not adversely affect any CI processes that might rely on Docker Hub authentication. Ensure all docker operations are sufficiently covered by the remaining GitHub Container Registry login.
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin

.github/workflows/test.yml:21

  • Verify that removing the 'docker buildx create --use' command does not negatively affect the build process, especially if buildx is required in certain contexts. If buildx is now unnecessary, this removal is acceptable.
docker buildx create --use

@wencaiwulue
Copy link
Member

wencaiwulue commented Mar 28, 2025

@yuyicai
https://github.com/kubenetworks/kubevpn/blob/master/charts/kubevpn/templates/job.yaml

openssl req -x509 -nodes -days 36500 -newkey rsa:2048 -subj "/CN={{ include "kubevpn.fullname" . }}.{{ .Release.Namespace }}.svc" -addext "subjectAltName=DNS:{{ include "kubevpn.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local,DNS:{{ include "kubevpn.fullname" . }}.{{ .Release.Namespace }}.svc" -keyout server.key -out server.crt

maybe needs to install openssl

Signed-off-by: yuyicai <yuyicai@hotmail.com>
@yuyicai
Copy link
Member Author

yuyicai commented Mar 28, 2025

@yuyicai https://github.com/kubenetworks/kubevpn/blob/master/charts/kubevpn/templates/job.yaml

openssl req -x509 -nodes -days 36500 -newkey rsa:2048 -subj "/CN={{ include "kubevpn.fullname" . }}.{{ .Release.Namespace }}.svc" -addext "subjectAltName=DNS:{{ include "kubevpn.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local,DNS:{{ include "kubevpn.fullname" . }}.{{ .Release.Namespace }}.svc" -keyout server.key -out server.crt

maybe needs to install openssl

DONE

@yuyicai yuyicai requested a review from Copilot March 28, 2025 10:33
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR aims to update the Docker-related configuration by modifying the Dockerfile behavior and streamlining related configurations in tests and workflows.

  • Removed an explicit kubeconfig setting from the test initialization.
  • Revised the GitHub Actions workflow by removing Docker Hub login and the buildx creation step.

Reviewed Changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.

File Description
pkg/handler/function_test.go Removed the explicit assignment of the kubeconfig, relying on default configuration.
.github/workflows/test.yml Removed Docker Hub login and docker buildx creation, aligning the workflow with changes.
Files not reviewed (3)
  • Makefile: Language not supported
  • build/Dockerfile: Language not supported
  • build/test.Dockerfile: Language not supported
Comments suppressed due to low confidence (3)

pkg/handler/function_test.go:466

  • Removing the explicit kubeconfig assignment may lead to unintended test configuration if the default location differs from the expected one. Please confirm that relying on the default behavior is acceptable.
configFlags.KubeConfig = &clientcmd.RecommendedHomeFile

.github/workflows/test.yml:20

  • The removal of the Docker Hub login command could affect image push operations if an alternative authentication mechanism is not in place. Please verify that using the GitHub Container Registry login is sufficient for your workflow.
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin

.github/workflows/test.yml:21

  • Removing the docker buildx creation step might leave the build environment without an active builder, potentially impacting image builds that rely on buildx. Consider confirming that an alternative builder is available or that it is no longer needed.
docker buildx create --use

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

Successfully merging this pull request may close these issues.

2 participants