Commit graph

42 commits

Author SHA1 Message Date
Matheus Pimenta
59ece92bed
pkg/kube: introduce support for custom kstatus readers
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-01-12 18:16:26 +00:00
George Jenkins
1581eaa034
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-10-09 10:26:24 -07:00
George Jenkins
b861de5696
Update pkg/kube/interface.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-10-09 10:24:49 -07:00
George Jenkins
b5de5b1591 chore: Cleanup additional/redundant kube client Interfaces
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-09-21 11:37:16 -07:00
George Jenkins
45141451b4 Kube client support server-side apply
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-08-12 10:50:46 -07:00
Patrick Seidensal
e55707b09d
Fix --take-ownership
If a resource exists in the cluster and is to be adopted by helm install
--take-ownership, it is left unchanged while helm reports the
installation to have succeeded.

This is due to CRs and CRDs being merged without three-way-merge, which
results in an empty patch.

By using a three-way-merge transparently when --take-ownership is used,
the helm behaves as expected without breaking previous behavior.

Fixes #30622

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
2025-04-07 13:54:56 +02:00
Austin Abro
21ee721242
go fmt
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-25 14:15:27 +00:00
Austin Abro
386523bdbc
update to get waiter instead of set
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-03-25 13:55:39 +00:00
Austin Abro
29c250c233
add back interface log check
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-25 16:09:30 +00:00
Austin Abro
11eeb4a6b1
merge
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-25 14:36:29 +00:00
Chris Berry
6d30fa5990 Add HookOutputFunc and generic yaml unmarshaller
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 12:33:12 +00:00
Chris Berry
3d4e679d9f Update based on review comments
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 12:31:08 +00:00
Chris Berry
cde407b7d1 Add hook annotations to output pod logs to client on success and fail
Signed-off-by: Chris Berry <bez625@gmail.com>
2025-02-21 12:30:29 +00:00
Austin Abro
7fde4962a8
set waiter in functions
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-16 21:33:15 +00:00
Austin Abro
bd3b5ee5d0
comment
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-10 15:51:14 +00:00
Austin Abro
f49a7e134a
start watch until ready
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-02-07 15:14:25 +00:00
George Jenkins
d637595735 chore: Remove unused WaitAndGetCompletedPodPhase
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-02-03 15:55:23 -08:00
Austin Abro
e56a6e678f
diff
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-01-14 15:03:21 +00:00
Austin Abro
8ce1876192
get rid of ext interface
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-01-06 14:12:34 +00:00
Austin Abro
4b59583670
delete wait and get completed phase
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2025-01-05 14:05:31 +00:00
Austin Abro
aacaa08be2
only emebed waiter
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2024-12-29 14:49:11 +00:00
Austin Abro
859ff9b548
change structure of client
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2024-12-29 14:37:33 +00:00
Austin Abro
4c1758143f
basic design up and balling
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2024-12-26 16:09:54 +00:00
Austin Abro
a61a35240e
understand it better
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
2024-12-23 22:55:09 +00:00
MichaelMorris
830d4a9ee9 Add option to support cascade deletion options
Add --cascade=<background|foreground|orphan> option to helm uninstall
Current behaviour is hardcoded to background

Addresses issue: https://github.com/helm/helm/issues/10586

Signed-off-by: MichaelMorris <michael.morris@est.tech>
2023-02-02 11:22:32 +00:00
Matt Farina
36e18fa6e1
Fix improper use of Table request/response to k8s API
Fixes #11712

A change was made that when validation was turned off the Kubernetes
packages were building objects as a Table type. This was done for
display purposes. When details about the objects was going to be
printed as part of #10912.

This broke rollback, and possibly other functionality, as a Table
type was returned in some cases that needed the regular object.
This caused things to break silently.

The fix involved adding in a new Function (and interface) to
query for tables instead of the objects themselves. There was not
a clean way to add it to the existing function that covered all
cases.

A second problem was noticed along the way. When data was output
via status as YAML or JSON it was in the form of a table rather
than the objects themselves. This did not reflect expectations
and did not match the functionality in kubectl. The code was
updated to return a table when that was presented and the objects
when they are being output for YAML or JSON. The API also supports
this handling to SDK users can replicate this functionality.

API changes made here were never released. The functions were
developed for this release of Helm and only ever appeared in an
RC. In this case, they can be changed.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-01-12 08:38:10 -05:00
Soujanya Mangipudi
ffa19a4b5d Addressing review comments - move printing code out of client.go
Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix circleci tests

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix formatting errors

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix tests

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix tests

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

fix gofmt issue

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>
2022-09-09 13:29:19 -07:00
Soujanya Mangipudi
20e3577543 Addressing review comments:
Extend Interface with new InterfaceResources to avoid breaking changes
Move change to staus command behind --show-resources flag

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>
2022-09-09 13:28:57 -07:00
Soujanya Mangipudi
9d5be803bc feat(helm): Supporting helm3 to show up resource names that were deployed as part of release in helm status command
Creating a new PR based on this existing stale PR https://github.com/helm/helm/pull/7728

Signed-off-by: Soujanya Mangipudi <somangip@microsoft.com>

# Conflicts:
#	go.sum
2022-09-09 13:28:48 -07:00
Mike Ng
75fe8883cc Rename newly introduced interface to InterfaceExt
Signed-off-by: Mike Ng <ming@redhat.com>
2021-08-27 09:38:04 -04:00
Mike Ng
d51a61f9ab Introduce a new interface for WaitForDelete() to avoid breaking backwards compatibility
Signed-off-by: Mike Ng <ming@redhat.com>
2021-08-26 17:30:55 -04:00
Mike Ng
655bdcd2fd feat: add optional boolean '--wait' flag to 'uninstall' command.
If set, 'uninstall' command will wait until all the resources are deleted before returning.
It will wait for as long as --timeout

closes #2378

Signed-off-by: Mike Ng <ming@redhat.com>
2021-08-26 15:31:49 -04:00
小龙同学
cf0c6fed51
fix(doc): fix kube client interface doc. (#9882)
- add missing interface methods doc.
- fix some wrong english grammar.

Signed-off-by: longkai <im.longkai@gmail.com>
2021-07-06 10:41:55 -06:00
zh168654
bfc575dec2 add waitwithjobs instead of changing wait api
Signed-off-by: zh168654 <zhangye.168@163.com>
2020-11-05 17:13:15 +08:00
zh168654
957d2a2bf9 add wait-for-jobs flag
Signed-off-by: zh168654 <zhangye.168@163.com>
2020-11-03 22:07:24 +08:00
Adam Reese
572b92dc8a
feat(pkg/kube): add openapi validation for k8s objects
Add back OpenAPI validation for kubernetes objects.

Fixes: #6382

Signed-off-by: Adam Reese <adam@reese.io>
2019-10-08 12:55:19 -07:00
Vibhav Bobade
5a07055645 Add IsReachable to /pkg/kube/client to see if connected to the internet
Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
2019-08-27 04:11:04 +05:30
Jacob LeGrone
49987975a8
fix(test): wait for pods and record status
Signed-off-by: Jacob LeGrone <git@jacob.work>
2019-08-02 00:16:02 -04:00
Taylor Thomas
dd8222d7f2 Removes clientset method from interface in favor of the configuration struct
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-30 11:51:40 -06:00
Taylor Thomas
15fc57f8a3 ref(*): Refactors kube client to be a bit more friendly
This changes most of the KubeClient interface to only ever build objects once and
then pass in everything as lists of resources. As a consequence, we needed to refactor
several of the actions. I took the opportunity to refactor out some duplicated
code while I was in the same area

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-30 11:51:39 -06:00
Taylor Thomas
1dac8421ef ref(kube): Renames Result type to ResourceList
`Result` is a misnomer and is going to be repurposed in a future commit for a
common result type for the different kube `Interface` methods

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-07-30 11:51:39 -06:00
Adam Reese
0338576fc5
ref(pkg/kube): cleanup kube client interface
* move the main interface to it's own file
* removed summarizeKeptManifests() which was the last place kube.Get()
  was called
* when polling for hooks, use external types
* refactor out legacyschema
* refactor detecting selectors from object
* refactor creating test client

Signed-off-by: Adam Reese <adam@reese.io>
2019-05-15 12:31:47 -07:00