Skip to content

Commit 004b63f

Browse files
committed
pkg/watches: use sigs.k8s.io/yaml
1 parent b049043 commit 004b63f

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ require (
1010
github.com/stretchr/testify v1.5.1
1111
go.uber.org/zap v1.13.0
1212
gomodules.xyz/jsonpatch/v2 v2.0.1
13-
gopkg.in/yaml.v2 v2.2.8
1413
helm.sh/helm/v3 v3.2.0
1514
k8s.io/api v0.18.2
1615
k8s.io/apiextensions-apiserver v0.18.2

pkg/watches/watches.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ import (
2121
"os"
2222
"time"
2323

24-
"gopkg.in/yaml.v2"
2524
"helm.sh/helm/v3/pkg/chart"
2625
"helm.sh/helm/v3/pkg/chart/loader"
2726
"k8s.io/apimachinery/pkg/runtime/schema"
27+
"sigs.k8s.io/yaml"
2828
)
2929

3030
type Watch struct {
31-
GroupVersionKind schema.GroupVersionKind `yaml:",inline"`
32-
ChartPath string `yaml:"chart"`
31+
schema.GroupVersionKind `json:",inline"`
32+
ChartPath string `json:"chart"`
3333

34-
WatchDependentResources *bool `yaml:"watchDependentResources,omitempty"`
35-
OverrideValues map[string]string `yaml:"overrideValues,omitempty"`
36-
ReconcilePeriod *time.Duration `yaml:"reconcilePeriod,omitempty"`
37-
MaxConcurrentReconciles *int `yaml:"maxConcurrentReconciles,omitempty"`
34+
WatchDependentResources *bool `json:"watchDependentResources,omitempty"`
35+
OverrideValues map[string]string `json:"overrideValues,omitempty"`
36+
ReconcilePeriod *time.Duration `json:"reconcilePeriod,omitempty"`
37+
MaxConcurrentReconciles *int `json:"maxConcurrentReconciles,omitempty"`
3838

39-
Chart *chart.Chart `yaml:"-"`
39+
Chart *chart.Chart `json:"-"`
4040
}
4141

4242
// Load loads a slice of Watches from the watch file at `path`. For each entry

0 commit comments

Comments
 (0)