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(kubernetes): Using the kubernetes API to monitor pods #54

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

Conversation

Jacobbrewer1
Copy link

@Jacobbrewer1 Jacobbrewer1 commented Nov 11, 2024

🚀 Changes proposed by this PR

I have added the user to configure the application to scout a provided service for pods and automatically update when a pod is killed or deleted. This makes the app a lot more scalable and prevents a redeploy or config change when pods are redeployed; a pods IP can change when a node is updated or re-scaled. This is because the current flow of the app requires the vault endpoints prior to watching them rather than dynamically doing this.

🧰 Type of change

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that causes existing functionality to not work as expected).
  • This change requires (or is) a documentation update.

📝 Notes to reviewer

I have added a the Kubernetes GO SDK to talk to the Kubernetes API. All pods will require a service account with the following permissions:

  • get on services in all namespaces
  • get on pods in all namespaces

I would have preferred to create a watcher on the vault pods but due to the tight coupling of the apps design, this is not possible without a rewrite.

🤝 Requirements

  • 💬 My changes as properly commented, primarily for hard-to-understand areas.
  • 📝 I have made corresponding changes to the documentation.
  • 🧪 I have included tests (if necessary) for this change.

@Jacobbrewer1 Jacobbrewer1 changed the title feat(kubernetes):Using the kubernetes API to monitor pods feat(kubernetes): Using the kubernetes API to monitor pods Nov 23, 2024
main.go Show resolved Hide resolved
continue
}

fmt.Println(workerIps)
Copy link

Choose a reason for hiding this comment

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

can you remove this print

})
}

fmt.Println(workerIps)
Copy link

Choose a reason for hiding this comment

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

here too

main.go Show resolved Hide resolved
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.

None yet

2 participants