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 operator deployment #622

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

Conversation

Alero-Awani
Copy link
Contributor

@Alero-Awani Alero-Awani commented Dec 12, 2024

This PR fixes #12706

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

This video shows how the operator gets deployed in the cluster when the kubeconfig file is uploaded to the UI.

meshery-operator-fix-ui.mp4

This video shows how the operator gets deployed in the cluster when the mesheryctl system config command is used.

meshery-operator-fix-cli.mp4

Signed-off-by: Alero Awani <[email protected]>
Signed-off-by: Alero Awani <[email protected]>
@sangramrath
Copy link

@Alero-Awani videos were clear and demonstrated that both approaches work.
@leecalcote this also validates that multiple k8s clusters can be added and managed by Meshery.

Copy link

@sangramrath sangramrath left a comment

Choose a reason for hiding this comment

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

Looks goods

@leecalcote
Copy link
Member

@souvikinator @aabidsofi19, please be aware of this.

Copy link
Member

@leecalcote leecalcote left a comment

Choose a reason for hiding this comment

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

The certfile and keyfile are written to the filesystem using the os.CreateTemp function in the setDataAndReturnFileHandler function. This function creates a temporary file and writes the provided data to it.

There is no explicit check for free space or filesystem permissions in the provided code. The os.CreateTemp function will fail if there is insufficient space or if the process lacks the necessary permissions to write to the temporary directory.

The os.CreateTemp function ensures that a unique temporary file is created, thus preventing overwrites of existing files. The function generates a unique filename with a random component to avoid conflicts with existing files.

Copy link
Member

@leecalcote leecalcote left a comment

Choose a reason for hiding this comment

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

@Alero-Awani, in the event that a user doesn't flatten their kubeconfig, and therefore, ensure that the necessary certificates are included in the contents of their kubeconfig file, are we still following those filepaths and attempting to retrieve the certs?

Ideally, mesheryctl does this as well as Meshery Server. The same kubeconfig certificate handling logic should be reused when applying Helm charts for Meshery Operator and any other Kubernetes connection creation flows.

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.

3 participants