forked from mittwald/go-helm-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
128 lines (97 loc) · 2.83 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
package helmclient
import (
"time"
"helm.sh/helm/v3/pkg/getter"
"k8s.io/client-go/rest"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/cli"
"helm.sh/helm/v3/pkg/repo"
)
// KubeConfClientOptions defines the options used for constructing a client via kubeconfig
type KubeConfClientOptions struct {
*Options
KubeContext string
KubeConfig []byte
}
// RestConfClientOptions defines the options used for constructing a client via REST config
type RestConfClientOptions struct {
*Options
RestConfig *rest.Config
}
// Options defines the options of a client
type Options struct {
Namespace string
RepositoryConfig string
RepositoryCache string
Debug bool
Linting bool
DebugLog action.DebugLog
}
// RESTClientGetter defines the values of a helm REST client
type RESTClientGetter struct {
namespace string
kubeConfig []byte
restConfig *rest.Config
}
// HelmClient Client defines the values of a helm client
type HelmClient struct {
Settings *cli.EnvSettings
Providers getter.Providers
storage *repo.File
ActionConfig *action.Configuration
linting bool
DebugLog action.DebugLog
}
// ChartSpec defines the values of a helm chart
type ChartSpec struct {
ReleaseName string `json:"release"`
ChartName string `json:"chart"`
Namespace string `json:"namespace"`
// use string instead of map[string]interface{}
// https://github.com/kubernetes-sigs/kubebuilder/issues/528#issuecomment-466449483
// and https://github.com/kubernetes-sigs/controller-tools/pull/317
// +optional
ValuesYaml string `json:"valuesYaml,omitempty"`
// +optional
Version string `json:"version,omitempty"`
// +optional
CreateNamespace bool `json:"createNamespace,omitempty"`
// +optional
DisableHooks bool `json:"disableHooks,omitempty"`
// +optional
Replace bool `json:"replace,omitempty"`
// +optional
Wait bool `json:"wait,omitempty"`
// +optional
DependencyUpdate bool `json:"dependencyUpdate,omitempty"`
// +optional
Timeout time.Duration `json:"timeout,omitempty"`
// +optional
GenerateName bool `json:"generateName,omitempty"`
// +optional
NameTemplate string `json:"NameTemplate,omitempty"`
// +optional
Atomic bool `json:"atomic,omitempty"`
// +optional
SkipCRDs bool `json:"skipCRDs,omitempty"`
// +optional
UpgradeCRDs bool `json:"upgradeCRDs,omitempty"`
// +optional
SubNotes bool `json:"subNotes,omitempty"`
// +optional
Force bool `json:"force,omitempty"`
// +optional
ResetValues bool `json:"resetValues,omitempty"`
// +optional
ReuseValues bool `json:"reuseValues,omitempty"`
// +optional
Recreate bool `json:"recreate,omitempty"`
// +optional
MaxHistory int `json:"maxHistory,omitempty"`
// +optional
CleanupOnFail bool `json:"cleanupOnFail,omitempty"`
// +optional
DryRun bool `json:"dryRun,omitempty"`
// +optional
Devel bool `json:"devel,omitempty"`
}