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

Remove k8s package #2507

Open
phillebaba opened this issue May 15, 2024 · 0 comments
Open

Remove k8s package #2507

phillebaba opened this issue May 15, 2024 · 0 comments
Assignees
Labels
tech-debt 💳 Debt that the team has charged and needs to repay

Comments

@phillebaba
Copy link
Collaborator

Describe what should be investigated or refactored

The k8s package with exception for a couple of functions simply wraps a Kubernetes clientset with very little value add. The functions return structs from k8s api package so the current implementation does not decouple the dependency towards these packages. This just increases bloat and complexity without any functionality. I suggest that we remove the k8s package and instead export a clientset in the Cluster struct. Allowing the calling code to use the clientset directly.

Links to any relevant code

func (k *K8s) GetAllPods() (*corev1.PodList, error) {

func (k *K8s) GetSecret(namespace, name string) (*corev1.Secret, error) {

Additional context

N/A

@phillebaba phillebaba added the tech-debt 💳 Debt that the team has charged and needs to repay label May 15, 2024
@phillebaba phillebaba self-assigned this May 16, 2024
lucasrod16 pushed a commit that referenced this issue May 28, 2024
## Description

Removes use of k8s info and nodes functions. 

## Related Issue

Relates to #2507

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/.github/CONTRIBUTING.md#developer-workflow)
followed
lucasrod16 pushed a commit that referenced this issue May 30, 2024
## Description

Removes use of k8s deprecations functions.

## Related Issue

Relates to #2507

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/.github/CONTRIBUTING.md#developer-workflow)
followed
AustinAbro321 pushed a commit that referenced this issue Jun 3, 2024
## Description

Removes use of k8s dynamic functions.

## Related Issue

Relates to #2507 

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/.github/CONTRIBUTING.md#developer-workflow)
followed

Co-authored-by: Lucas Rodriguez <lucas.rodriguez@defenseunicorns.com>
lucasrod16 pushed a commit that referenced this issue Jun 3, 2024
## Description

This change removes the k8s namespace code and replaces it with direct
use of the client set instead.

## Related Issue

Relates to #2507

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/.github/CONTRIBUTING.md#developer-workflow)
followed

---------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt 💳 Debt that the team has charged and needs to repay
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant