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

refactor tarian #54

Merged
merged 10 commits into from
Sep 10, 2023
Merged

refactor tarian #54

merged 10 commits into from
Sep 10, 2023

Conversation

pratikjagrut
Copy link
Collaborator

This pull request brings significant changes by revamping the CLIs using cobra. It also incorporates a new logging and error mechanism, enhancing the overall functionality and user experience.

)

const (
defaultServerAddress = "localhost:50051"

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling.

Do not leave debug code in production
cmd.Flags().StringVar(&o.host, "host", defaultHost, "The host to listen on")
cmd.Flags().StringVar(&o.port, "port", defaultPort, "The port to listen on")

cmd.Flags().StringVar(&o.alertManagerAddress, "alertmanager-address", "", "Alert manager address to send alerts to. For example: http://localhost:9093. Setting this enables alerting")

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling.

Do not leave debug code in production
podAgent := podagent.NewPodAgent("localhost:" + e2eClusterAgentPort)
clusterAgent, err := clusteragent.NewClusterAgent(log.GetLogger(), clusterAgentConfig)
require.Nil(t, err)
podAgent := podagent.NewPodAgent(log.GetLogger(), "localhost:"+e2eClusterAgentPort)

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling.

Do not leave debug code in production
defaultPort = "50052"
defaultHost = ""

defaultServerAddress = "localhost:50051"

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling.

Do not leave debug code in production
// Add flags
runWebhookServerCmd.Flags().IntVar(&cmd.port, "port", 9443, "Webhook server port")
runWebhookServerCmd.Flags().StringVar(&cmd.podAgentContainerName, "pod-agent-container-name", "tarian-pod-agent", "Pod agent container name to be injected")
runWebhookServerCmd.Flags().StringVar(&cmd.podAgentContainerImage, "pod-agent-container-image", "localhost:5000/tarian-pod-agent:latest", "Pod agent container image to be injected")

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling.

Do not leave debug code in production
@pratikjagrut
Copy link
Collaborator Author

charts / lint-test workflow is failing because it's using an image from ghcr registry and changes in this PR makes it obsolete so ignore it for now.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@pratikjagrut pratikjagrut force-pushed the refactor.tarian branch 6 times, most recently from 976d4ba to bc7ebf3 Compare September 1, 2023 19:07
@devopstoday11
Copy link
Collaborator

@andylibrian , please check this PR.

@pratikjagrut @pratikjagrut, have you tested all the changes before submitting this PR? I'm just confirming.

@andylibrian andylibrian merged commit ee428e4 into kube-tarian:main Sep 10, 2023
12 checks passed
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