mirror of
https://github.com/rancher/steve.git
synced 2025-09-12 21:39:30 +00:00
Refactor HelmData formatter to avoid importing helm dependencies (#607)
* Small refactor in tests * Small refactor around decoding * Refactor decodeHelm3 so we can drop the helm dependency * Vendor helmv2 protobuf types so we can drop the helmv2 old dependency * go mod tidy * Add test with sample HelmV2 data
This commit is contained in:
7
go.mod
7
go.mod
@@ -32,15 +32,14 @@ require (
|
||||
github.com/urfave/cli/v2 v2.27.5
|
||||
go.uber.org/mock v0.5.0
|
||||
golang.org/x/sync v0.12.0
|
||||
google.golang.org/protobuf v1.35.2
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
helm.sh/helm/v3 v3.17.2
|
||||
k8s.io/api v0.32.2
|
||||
k8s.io/apiextensions-apiserver v0.32.2
|
||||
k8s.io/apimachinery v0.32.2
|
||||
k8s.io/apiserver v0.32.2
|
||||
k8s.io/client-go v0.32.2
|
||||
k8s.io/component-base v0.32.2
|
||||
k8s.io/helm v2.17.0+incompatible
|
||||
k8s.io/klog v1.0.0
|
||||
k8s.io/kube-aggregator v0.32.1
|
||||
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f
|
||||
@@ -48,11 +47,11 @@ require (
|
||||
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
|
||||
modernc.org/sqlite v1.36.0
|
||||
sigs.k8s.io/controller-runtime v0.19.0
|
||||
sigs.k8s.io/yaml v1.4.0
|
||||
)
|
||||
|
||||
require (
|
||||
cel.dev/expr v0.18.0 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.3.0 // indirect
|
||||
github.com/NYTimes/gziphandler v1.1.1 // indirect
|
||||
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
||||
@@ -132,7 +131,6 @@ require (
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect
|
||||
google.golang.org/grpc v1.65.0 // indirect
|
||||
google.golang.org/protobuf v1.35.2 // indirect
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||
@@ -146,5 +144,4 @@ require (
|
||||
sigs.k8s.io/cli-utils v0.37.2 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.3 // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
)
|
||||
|
8
go.sum
8
go.sum
@@ -3,8 +3,6 @@ cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU=
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=
|
||||
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
|
||||
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
|
||||
@@ -13,8 +11,6 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB
|
||||
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
|
||||
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0=
|
||||
github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
|
||||
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
|
||||
@@ -445,8 +441,6 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
helm.sh/helm/v3 v3.17.2 h1:agYQ5ew2jq5vdx2K7q5W44KyKQrnSubUMCQsjkiv3/o=
|
||||
helm.sh/helm/v3 v3.17.2/go.mod h1:+uJKMH/UiMzZQOALR3XUf3BLIoczI2RKKD6bMhPh4G8=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8=
|
||||
@@ -465,8 +459,6 @@ k8s.io/client-go v0.32.2/go.mod h1:fpZ4oJXclZ3r2nDOv+Ux3XcJutfrwjKTCHz2H3sww94=
|
||||
k8s.io/component-base v0.32.2 h1:1aUL5Vdmu7qNo4ZsE+569PV5zFatM9hl+lb3dEea2zU=
|
||||
k8s.io/component-base v0.32.2/go.mod h1:PXJ61Vx9Lg+P5mS8TLd7bCIr+eMJRQTyXe8KvkrvJq0=
|
||||
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/helm v2.17.0+incompatible h1:Bpn6o1wKLYqKM3+Osh8e+1/K2g/GsQJ4F4yNF2+deao=
|
||||
k8s.io/helm v2.17.0+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI=
|
||||
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
|
||||
|
@@ -7,14 +7,17 @@ import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
|
||||
// helm v2 is long since deprecated
|
||||
// Unlike helm v3, it uses Protobuf encoding, so we can't use generic decoding without the message descriptors.
|
||||
// The relevant types were vendored, since they won't change anymore. We should consider dropping support for Helm v2.
|
||||
rspb "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rancher/apiserver/pkg/types"
|
||||
"github.com/rancher/norman/types/convert"
|
||||
"github.com/rancher/wrangler/v3/pkg/data"
|
||||
"github.com/sirupsen/logrus"
|
||||
"helm.sh/helm/v3/pkg/release"
|
||||
rspb "k8s.io/helm/pkg/proto/hapi/release"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -57,7 +60,7 @@ func HandleHelmData(request *types.APIRequest, resource *types.RawResource) {
|
||||
}
|
||||
}
|
||||
|
||||
func Pod(request *types.APIRequest, resource *types.RawResource) {
|
||||
func Pod(_ *types.APIRequest, resource *types.RawResource) {
|
||||
data := resource.APIObject.Data()
|
||||
fields := data.StringSlice("metadata", "fields")
|
||||
if len(fields) > 2 {
|
||||
@@ -67,7 +70,7 @@ func Pod(request *types.APIRequest, resource *types.RawResource) {
|
||||
|
||||
// decodeHelm3 receives a helm3 release data string, decodes the string data using the standard base64 library
|
||||
// and unmarshals the data into release.Release struct to return it.
|
||||
func decodeHelm3(data string) (*release.Release, error) {
|
||||
func decodeHelm3(data string) (any, error) {
|
||||
b, err := base64.StdEncoding.DecodeString(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -77,25 +80,23 @@ func decodeHelm3(data string) (*release.Release, error) {
|
||||
if len(b) <= 3 {
|
||||
return nil, ErrNotHelmRelease
|
||||
}
|
||||
var r io.Reader = bytes.NewReader(b)
|
||||
|
||||
// For backwards compatibility with releases that were stored before
|
||||
// compression was introduced we skip decompression if the
|
||||
// gzip magic header is not found
|
||||
if bytes.Equal(b[0:3], magicGzip) {
|
||||
r, err := gzip.NewReader(bytes.NewReader(b))
|
||||
gzr, err := gzip.NewReader(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b2, err := io.ReadAll(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b = b2
|
||||
defer gzr.Close()
|
||||
r = gzr
|
||||
}
|
||||
|
||||
var rls release.Release
|
||||
// unmarshal release object bytes
|
||||
if err := json.Unmarshal(b, &rls); err != nil {
|
||||
var rls json.RawMessage
|
||||
// unmarshal JSON release payload
|
||||
if err := json.NewDecoder(r).Decode(&rls); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &rls, nil
|
||||
@@ -116,6 +117,8 @@ func decodeHelm2(data string) (*rspb.Release, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer r.Close()
|
||||
|
||||
b2, err := io.ReadAll(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@@ -5,33 +5,25 @@ import (
|
||||
"compress/gzip"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"helm.sh/helm/v3/pkg/chart"
|
||||
"helm.sh/helm/v3/pkg/release"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
pbchart "k8s.io/helm/pkg/proto/hapi/chart"
|
||||
rspb "k8s.io/helm/pkg/proto/hapi/release"
|
||||
"net/url"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
pbchart "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api"
|
||||
rspb "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/rancher/apiserver/pkg/types"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/stretchr/testify/assert"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
yaml "sigs.k8s.io/yaml/goyaml.v3"
|
||||
)
|
||||
|
||||
var r = release.Release{
|
||||
Name: "helmV3Release",
|
||||
Chart: &chart.Chart{
|
||||
Values: map[string]interface{}{
|
||||
"key": "value",
|
||||
},
|
||||
},
|
||||
Version: 1,
|
||||
Namespace: "default",
|
||||
}
|
||||
|
||||
var rv2 = rspb.Release{
|
||||
Name: "helmV3Release",
|
||||
Name: "helmV2Release",
|
||||
Chart: &pbchart.Chart{
|
||||
Metadata: &pbchart.Metadata{
|
||||
Name: "chartName",
|
||||
@@ -48,41 +40,53 @@ var rv2 = rspb.Release{
|
||||
}
|
||||
|
||||
func Test_HandleHelmData(t *testing.T) {
|
||||
const helmRelease = `{
|
||||
"name": "helmV3Release",
|
||||
"chart": {
|
||||
"values": {
|
||||
"key": "value"
|
||||
}
|
||||
},
|
||||
"version": 1,
|
||||
"namespace": "default"
|
||||
}
|
||||
`
|
||||
var r map[string]any
|
||||
if err := json.Unmarshal([]byte(helmRelease), &r); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
resource *types.RawResource
|
||||
request *types.APIRequest
|
||||
want *types.RawResource
|
||||
helmVersion int
|
||||
}{ //helm v3
|
||||
name string
|
||||
resource *types.RawResource
|
||||
request *types.APIRequest
|
||||
want *types.RawResource
|
||||
}{
|
||||
{
|
||||
name: "When receiving a SECRET resource with includeHelmData set to TRUE and owner set to HELM, it should decode the helm3 release",
|
||||
resource: newSecret("helm", map[string]interface{}{
|
||||
"release": base64.StdEncoding.EncodeToString([]byte(newV3Release())),
|
||||
resource: newSecret("helm", map[string]any{
|
||||
"release": toGzippedBase64(t, helmRelease),
|
||||
}),
|
||||
request: newRequest("true"),
|
||||
want: newSecret("helm", map[string]interface{}{
|
||||
"release": &r,
|
||||
want: newSecret("helm", map[string]any{
|
||||
"release": r,
|
||||
}),
|
||||
helmVersion: 3,
|
||||
},
|
||||
{
|
||||
name: "When receiving a SECRET resource with includeHelmData set to FALSE and owner set to HELM, it should drop the helm data",
|
||||
resource: newSecret("helm", map[string]interface{}{
|
||||
"release": base64.StdEncoding.EncodeToString([]byte(newV3Release())),
|
||||
resource: newSecret("helm", map[string]any{
|
||||
"release": toGzippedBase64(t, helmRelease),
|
||||
}),
|
||||
request: newRequest("false"),
|
||||
want: newSecret("helm", map[string]interface{}{}),
|
||||
helmVersion: 3,
|
||||
request: newRequest("false"),
|
||||
want: newSecret("helm", map[string]any{}),
|
||||
},
|
||||
{
|
||||
name: "When receiving a SECRET resource WITHOUT the includeHelmData query parameter and owner set to HELM, it should drop the helm data",
|
||||
resource: newSecret("helm", map[string]interface{}{
|
||||
"release": base64.StdEncoding.EncodeToString([]byte(newV3Release())),
|
||||
resource: newSecret("helm", map[string]any{
|
||||
"release": base64.StdEncoding.EncodeToString([]byte(toGzippedBase64(t, helmRelease))),
|
||||
}),
|
||||
request: newRequest(""),
|
||||
want: newSecret("helm", map[string]interface{}{}),
|
||||
helmVersion: 3,
|
||||
request: newRequest(""),
|
||||
want: newSecret("helm", map[string]any{}),
|
||||
},
|
||||
{
|
||||
name: "When receiving a non-helm SECRET or CONFIGMAP resource with includeHelmData set to TRUE, it shouldn't change the resource",
|
||||
@@ -107,7 +111,6 @@ func Test_HandleHelmData(t *testing.T) {
|
||||
},
|
||||
}}},
|
||||
},
|
||||
helmVersion: 3,
|
||||
},
|
||||
{
|
||||
name: "When receiving a non-helm SECRET or CONFIGMAP resource with includeHelmData set to FALSE, it shouldn't change the resource",
|
||||
@@ -132,7 +135,6 @@ func Test_HandleHelmData(t *testing.T) {
|
||||
},
|
||||
}}},
|
||||
},
|
||||
helmVersion: 3,
|
||||
},
|
||||
{
|
||||
name: "When receiving a non-helm SECRET or CONFIGMAP resource WITHOUT the includeHelmData query parameter, it shouldn't change the resource",
|
||||
@@ -157,66 +159,85 @@ func Test_HandleHelmData(t *testing.T) {
|
||||
},
|
||||
}}},
|
||||
},
|
||||
helmVersion: 3,
|
||||
},
|
||||
{
|
||||
name: "When receiving a CONFIGMAP resource with includeHelmData set to TRUE and owner set to HELM, it should decode the helm3 release",
|
||||
resource: newConfigMap("helm", map[string]interface{}{
|
||||
"release": newV3Release(),
|
||||
resource: newConfigMap("helm", map[string]any{
|
||||
"release": toGzippedBase64(t, helmRelease),
|
||||
}),
|
||||
request: newRequest("true"),
|
||||
want: newConfigMap("helm", map[string]interface{}{
|
||||
"release": &r,
|
||||
want: newConfigMap("helm", map[string]any{
|
||||
"release": r,
|
||||
}),
|
||||
helmVersion: 3,
|
||||
},
|
||||
{
|
||||
name: "When receiving a CONFIGMAP resource with includeHelmData set to FALSE and owner set to HELM, it should drop the helm data",
|
||||
resource: newConfigMap("helm", map[string]interface{}{
|
||||
"release": newV3Release(),
|
||||
resource: newConfigMap("helm", map[string]any{
|
||||
"release": toGzippedBase64(t, helmRelease),
|
||||
}),
|
||||
request: newRequest("false"),
|
||||
want: newConfigMap("helm", map[string]interface{}{}),
|
||||
helmVersion: 3,
|
||||
request: newRequest("false"),
|
||||
want: newConfigMap("helm", map[string]any{}),
|
||||
},
|
||||
{
|
||||
name: "When receiving a CONFIGMAP resource WITHOUT the includeHelmData query parameter and owner set to HELM, it should drop the helm data",
|
||||
resource: newConfigMap("helm", map[string]interface{}{
|
||||
"release": newV3Release(),
|
||||
resource: newConfigMap("helm", map[string]any{
|
||||
"release": toGzippedBase64(t, helmRelease),
|
||||
}),
|
||||
request: newRequest(""),
|
||||
want: newConfigMap("helm", map[string]interface{}{}),
|
||||
helmVersion: 3,
|
||||
request: newRequest(""),
|
||||
want: newConfigMap("helm", map[string]any{}),
|
||||
},
|
||||
//helm v2
|
||||
{
|
||||
name: "[no magic gzip] When receiving a SECRET resource with includeHelmData set to TRUE and owner set to HELM, it should decode the helm3 release",
|
||||
resource: newSecret("helm", map[string]any{
|
||||
"release": base64.StdEncoding.EncodeToString([]byte(helmRelease)),
|
||||
}),
|
||||
request: newRequest("true"),
|
||||
want: newSecret("helm", map[string]any{
|
||||
"release": r,
|
||||
}),
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
HandleHelmData(tt.request, tt.resource)
|
||||
// data will be serialized, so it makes sense to compare their JSON representation
|
||||
assert.Empty(t, cmp.Diff(toPlainMap(t, tt.resource), toPlainMap(t, tt.want)))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_HandleLegacyHelmV2Data(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
resource *types.RawResource
|
||||
request *types.APIRequest
|
||||
want *types.RawResource
|
||||
}{
|
||||
{
|
||||
name: "When receiving a SECRET resource with includeHelmData set to TRUE and owner set to TILLER, it should decode the helm2 release",
|
||||
resource: newSecret("TILLER", map[string]interface{}{
|
||||
"release": base64.StdEncoding.EncodeToString([]byte(newV2Release())),
|
||||
"release": newV2Release(),
|
||||
}),
|
||||
request: newRequest("true"),
|
||||
want: newSecret("TILLER", map[string]interface{}{
|
||||
"release": &rv2,
|
||||
}),
|
||||
helmVersion: 2,
|
||||
},
|
||||
{
|
||||
name: "When receiving a SECRET resource with includeHelmData set to FALSE and owner set to TILLER, it should drop the helm data",
|
||||
resource: newSecret("TILLER", map[string]interface{}{
|
||||
"release": base64.StdEncoding.EncodeToString([]byte(newV2Release())),
|
||||
"release": newV2Release(),
|
||||
}),
|
||||
request: newRequest("false"),
|
||||
want: newSecret("TILLER", map[string]interface{}{}),
|
||||
helmVersion: 2,
|
||||
request: newRequest("false"),
|
||||
want: newSecret("TILLER", map[string]interface{}{}),
|
||||
},
|
||||
{
|
||||
name: "When receiving a SECRET resource WITHOUT the includeHelmData query parameter and owner set to TILLER, it should drop the helm data",
|
||||
resource: newSecret("TILLER", map[string]interface{}{
|
||||
"release": base64.StdEncoding.EncodeToString([]byte(newV2Release())),
|
||||
"release": newV2Release(),
|
||||
}),
|
||||
request: newRequest(""),
|
||||
want: newSecret("TILLER", map[string]interface{}{}),
|
||||
helmVersion: 2,
|
||||
request: newRequest(""),
|
||||
want: newSecret("TILLER", map[string]interface{}{}),
|
||||
},
|
||||
{
|
||||
name: "When receiving a CONFIGMAP resource with includeHelmData set to TRUE and owner set to TILLER, it should decode the helm2 release",
|
||||
@@ -227,65 +248,46 @@ func Test_HandleHelmData(t *testing.T) {
|
||||
want: newConfigMap("TILLER", map[string]interface{}{
|
||||
"release": &rv2,
|
||||
}),
|
||||
helmVersion: 2,
|
||||
},
|
||||
{
|
||||
name: "When receiving a CONFIGMAP resource with includeHelmData set to FALSE and owner set to TILLER, it should drop the helm data",
|
||||
resource: newConfigMap("TILLER", map[string]interface{}{
|
||||
"release": newV2Release(),
|
||||
}),
|
||||
request: newRequest("false"),
|
||||
want: newConfigMap("TILLER", map[string]interface{}{}),
|
||||
helmVersion: 2,
|
||||
request: newRequest("false"),
|
||||
want: newConfigMap("TILLER", map[string]interface{}{}),
|
||||
},
|
||||
{
|
||||
name: "When receiving a CONFIGMAP resource WITHOUT the includeHelmData query parameter and owner set to TILLER, it should drop the helm data",
|
||||
resource: newConfigMap("TILLER", map[string]interface{}{
|
||||
"release": newV2Release(),
|
||||
}),
|
||||
request: newRequest(""),
|
||||
want: newConfigMap("TILLER", map[string]interface{}{}),
|
||||
helmVersion: 2,
|
||||
},
|
||||
{
|
||||
name: "[no magic gzip] When receiving a SECRET resource with includeHelmData set to TRUE and owner set to HELM, it should decode the helm3 release",
|
||||
resource: newSecret("helm", map[string]interface{}{
|
||||
"release": base64.StdEncoding.EncodeToString([]byte(newV3ReleaseWithoutGzip())),
|
||||
}),
|
||||
request: newRequest("true"),
|
||||
want: newSecret("helm", map[string]interface{}{
|
||||
"release": &r,
|
||||
}),
|
||||
helmVersion: 3,
|
||||
request: newRequest(""),
|
||||
want: newConfigMap("TILLER", map[string]interface{}{}),
|
||||
},
|
||||
{
|
||||
name: "[no magic gzip] When receiving a SECRET resource with includeHelmData set to TRUE and owner set to TILLER, it should decode the helm2 release",
|
||||
resource: newSecret("TILLER", map[string]interface{}{
|
||||
"release": base64.StdEncoding.EncodeToString([]byte(newV2ReleaseWithoutGzip())),
|
||||
"release": newV2ReleaseWithoutGzip(),
|
||||
}),
|
||||
request: newRequest("true"),
|
||||
want: newSecret("TILLER", map[string]interface{}{
|
||||
"release": &rv2,
|
||||
}),
|
||||
helmVersion: 2,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
HandleHelmData(tt.request, tt.resource)
|
||||
if tt.helmVersion == 2 {
|
||||
u, ok := tt.resource.APIObject.Object.(*unstructured.Unstructured)
|
||||
u, ok := tt.resource.APIObject.Object.(*unstructured.Unstructured)
|
||||
assert.True(t, ok)
|
||||
rl, ok := u.UnstructuredContent()["data"].(map[string]interface{})["release"]
|
||||
if ok {
|
||||
u, ok = tt.want.APIObject.Object.(*unstructured.Unstructured)
|
||||
assert.True(t, ok)
|
||||
rl, ok := u.UnstructuredContent()["data"].(map[string]interface{})["release"]
|
||||
if ok {
|
||||
u, ok = tt.want.APIObject.Object.(*unstructured.Unstructured)
|
||||
assert.True(t, ok)
|
||||
rl2, ok := u.UnstructuredContent()["data"].(map[string]interface{})["release"]
|
||||
assert.True(t, ok)
|
||||
assert.True(t, proto.Equal(rl.(proto.Message), rl2.(proto.Message)))
|
||||
} else {
|
||||
assert.Equal(t, tt.resource, tt.want)
|
||||
}
|
||||
rl2, ok := u.UnstructuredContent()["data"].(map[string]interface{})["release"]
|
||||
assert.True(t, ok)
|
||||
assert.True(t, proto.Equal(rl.(proto.Message), rl2.(proto.Message)))
|
||||
} else {
|
||||
assert.Equal(t, tt.resource, tt.want)
|
||||
}
|
||||
@@ -293,17 +295,46 @@ func Test_HandleHelmData(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func newSecret(owner string, data map[string]interface{}) *types.RawResource {
|
||||
func toPlainMap(t *testing.T, v interface{}) map[string]any {
|
||||
t.Helper()
|
||||
var buf bytes.Buffer
|
||||
if err := json.NewEncoder(&buf).Encode(v); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var res map[string]any
|
||||
if err := json.NewDecoder(&buf).Decode(&res); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
pruneNullValues(res)
|
||||
return res
|
||||
}
|
||||
|
||||
func pruneNullValues(m map[string]any) {
|
||||
for k, v := range m {
|
||||
if v == nil {
|
||||
delete(m, k)
|
||||
} else if mm, ok := v.(map[string]any); ok {
|
||||
pruneNullValues(mm)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func newSecret(owner string, data map[string]any) *types.RawResource {
|
||||
for k, v := range data {
|
||||
if s, ok := v.(string); ok {
|
||||
data[k] = base64.StdEncoding.EncodeToString([]byte(s))
|
||||
}
|
||||
}
|
||||
secret := &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Secret",
|
||||
"data": data,
|
||||
}}
|
||||
if owner == "helm" {
|
||||
secret.SetLabels(map[string]string{"owner": owner})
|
||||
}
|
||||
if owner == "TILLER" {
|
||||
secret.SetLabels(map[string]string{"OWNER": owner})
|
||||
} else {
|
||||
secret.SetLabels(map[string]string{"owner": owner})
|
||||
}
|
||||
return &types.RawResource{
|
||||
Type: "secret",
|
||||
@@ -317,11 +348,10 @@ func newConfigMap(owner string, data map[string]interface{}) *types.RawResource
|
||||
"kind": "configmap",
|
||||
"data": data,
|
||||
}}
|
||||
if owner == "helm" {
|
||||
cfgMap.SetLabels(map[string]string{"owner": owner})
|
||||
}
|
||||
if owner == "TILLER" {
|
||||
cfgMap.SetLabels(map[string]string{"OWNER": owner})
|
||||
} else {
|
||||
cfgMap.SetLabels(map[string]string{"owner": owner})
|
||||
}
|
||||
return &types.RawResource{
|
||||
Type: "configmap",
|
||||
@@ -351,24 +381,18 @@ func newV2ReleaseWithoutGzip() string {
|
||||
return base64.StdEncoding.EncodeToString(b)
|
||||
}
|
||||
|
||||
func newV3Release() string {
|
||||
b, err := json.Marshal(r)
|
||||
if err != nil {
|
||||
logrus.Errorf("Failed to marshal release: %v", err)
|
||||
}
|
||||
buf := bytes.Buffer{}
|
||||
func toGzippedBase64(t *testing.T, v string) string {
|
||||
t.Helper()
|
||||
var buf bytes.Buffer
|
||||
gz := gzip.NewWriter(&buf)
|
||||
gz.Write(b)
|
||||
gz.Close()
|
||||
return base64.StdEncoding.EncodeToString(buf.Bytes())
|
||||
}
|
||||
|
||||
func newV3ReleaseWithoutGzip() string {
|
||||
b, err := json.Marshal(r)
|
||||
if err != nil {
|
||||
logrus.Errorf("Failed to marshal release: %v", err)
|
||||
defer gz.Close()
|
||||
if _, err := gz.Write([]byte(v)); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
return base64.StdEncoding.EncodeToString(b)
|
||||
if err := gz.Close(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
return base64.StdEncoding.EncodeToString(buf.Bytes())
|
||||
}
|
||||
|
||||
func newRequest(value string) *types.APIRequest {
|
||||
@@ -378,3 +402,39 @@ func newRequest(value string) *types.APIRequest {
|
||||
}
|
||||
return req
|
||||
}
|
||||
|
||||
func loadTestYamlFile(t *testing.T, path string, into any) {
|
||||
t.Helper()
|
||||
f, err := os.Open(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
if err := yaml.NewDecoder(f).Decode(into); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func Test_decodeHelm2(t *testing.T) {
|
||||
// sample ConfigMap from installing a "mariadb" chart using helm v2.1.7
|
||||
var cm corev1.ConfigMap
|
||||
loadTestYamlFile(t, "testdata/release-cm.yaml", &cm)
|
||||
|
||||
releaseData := cm.Data["release"]
|
||||
if releaseData == "" {
|
||||
t.Fatalf("release data is empty")
|
||||
}
|
||||
|
||||
release, err := decodeHelm2(releaseData)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
assert.Equal(t, "mariadb", release.Name)
|
||||
assert.Equal(t, "default", release.Namespace)
|
||||
assert.Equal(t, "mariadb", release.Chart.Metadata.Name)
|
||||
assert.Equal(t, "7.3.14", release.Chart.Metadata.Version)
|
||||
assert.NotEmpty(t, release.Chart.GetValues().GetRaw())
|
||||
assert.Equal(t, "{}\n", release.GetConfig().GetRaw())
|
||||
}
|
||||
|
10
pkg/resources/formatters/internal/legacytypes/Makefile
Normal file
10
pkg/resources/formatters/internal/legacytypes/Makefile
Normal file
@@ -0,0 +1,10 @@
|
||||
.PHONY: all
|
||||
all: protos
|
||||
|
||||
.PHONY: protos
|
||||
protos:
|
||||
protoc --proto_path=helmv2api --go_out=helmv2api --go_opt=paths=source_relative helmv2api/*.proto
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@rm -rf helmv2api/*.pb.go 2>/dev/null
|
1
pkg/resources/formatters/internal/legacytypes/README.md
Normal file
1
pkg/resources/formatters/internal/legacytypes/README.md
Normal file
@@ -0,0 +1 @@
|
||||
# Copied and adapted from (https://github.com/helm/helm/tree/v2.17.0/_proto)
|
@@ -0,0 +1,193 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: chart.proto
|
||||
|
||||
package helmv2api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
anypb "google.golang.org/protobuf/types/known/anypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Chart is a helm package that contains metadata, a default config, zero or more
|
||||
// optionally parameterizable templates, and zero or more charts (dependencies).
|
||||
type Chart struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// Contents of the Chartfile.
|
||||
Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
// Templates for this chart.
|
||||
Templates []*Template `protobuf:"bytes,2,rep,name=templates,proto3" json:"templates,omitempty"`
|
||||
// Charts that this chart depends on.
|
||||
Dependencies []*Chart `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
|
||||
// Default config for this template.
|
||||
Values *Config `protobuf:"bytes,4,opt,name=values,proto3" json:"values,omitempty"`
|
||||
// Miscellaneous files in a chart archive,
|
||||
// e.g. README, LICENSE, etc.
|
||||
Files []*anypb.Any `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Chart) Reset() {
|
||||
*x = Chart{}
|
||||
mi := &file_chart_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Chart) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Chart) ProtoMessage() {}
|
||||
|
||||
func (x *Chart) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_chart_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Chart.ProtoReflect.Descriptor instead.
|
||||
func (*Chart) Descriptor() ([]byte, []int) {
|
||||
return file_chart_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Chart) GetMetadata() *Metadata {
|
||||
if x != nil {
|
||||
return x.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Chart) GetTemplates() []*Template {
|
||||
if x != nil {
|
||||
return x.Templates
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Chart) GetDependencies() []*Chart {
|
||||
if x != nil {
|
||||
return x.Dependencies
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Chart) GetValues() *Config {
|
||||
if x != nil {
|
||||
return x.Values
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Chart) GetFiles() []*anypb.Any {
|
||||
if x != nil {
|
||||
return x.Files
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_chart_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_chart_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\vchart.proto\x12\x15legacytypes.helmv2api\x1a\fconfig.proto\x1a\x0emetadata.proto\x1a\x0etemplate.proto\x1a\x19google/protobuf/any.proto\"\xa8\x02\n" +
|
||||
"\x05Chart\x12;\n" +
|
||||
"\bmetadata\x18\x01 \x01(\v2\x1f.legacytypes.helmv2api.MetadataR\bmetadata\x12=\n" +
|
||||
"\ttemplates\x18\x02 \x03(\v2\x1f.legacytypes.helmv2api.TemplateR\ttemplates\x12@\n" +
|
||||
"\fdependencies\x18\x03 \x03(\v2\x1c.legacytypes.helmv2api.ChartR\fdependencies\x125\n" +
|
||||
"\x06values\x18\x04 \x01(\v2\x1d.legacytypes.helmv2api.ConfigR\x06values\x12*\n" +
|
||||
"\x05files\x18\x05 \x03(\v2\x14.google.protobuf.AnyR\x05filesBRZPgithub.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2apib\x06proto3"
|
||||
|
||||
var (
|
||||
file_chart_proto_rawDescOnce sync.Once
|
||||
file_chart_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_chart_proto_rawDescGZIP() []byte {
|
||||
file_chart_proto_rawDescOnce.Do(func() {
|
||||
file_chart_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_chart_proto_rawDesc), len(file_chart_proto_rawDesc)))
|
||||
})
|
||||
return file_chart_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_chart_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_chart_proto_goTypes = []any{
|
||||
(*Chart)(nil), // 0: legacytypes.helmv2api.Chart
|
||||
(*Metadata)(nil), // 1: legacytypes.helmv2api.Metadata
|
||||
(*Template)(nil), // 2: legacytypes.helmv2api.Template
|
||||
(*Config)(nil), // 3: legacytypes.helmv2api.Config
|
||||
(*anypb.Any)(nil), // 4: google.protobuf.Any
|
||||
}
|
||||
var file_chart_proto_depIdxs = []int32{
|
||||
1, // 0: legacytypes.helmv2api.Chart.metadata:type_name -> legacytypes.helmv2api.Metadata
|
||||
2, // 1: legacytypes.helmv2api.Chart.templates:type_name -> legacytypes.helmv2api.Template
|
||||
0, // 2: legacytypes.helmv2api.Chart.dependencies:type_name -> legacytypes.helmv2api.Chart
|
||||
3, // 3: legacytypes.helmv2api.Chart.values:type_name -> legacytypes.helmv2api.Config
|
||||
4, // 4: legacytypes.helmv2api.Chart.files:type_name -> google.protobuf.Any
|
||||
5, // [5:5] is the sub-list for method output_type
|
||||
5, // [5:5] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_chart_proto_init() }
|
||||
func file_chart_proto_init() {
|
||||
if File_chart_proto != nil {
|
||||
return
|
||||
}
|
||||
file_config_proto_init()
|
||||
file_metadata_proto_init()
|
||||
file_template_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_chart_proto_rawDesc), len(file_chart_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_chart_proto_goTypes,
|
||||
DependencyIndexes: file_chart_proto_depIdxs,
|
||||
MessageInfos: file_chart_proto_msgTypes,
|
||||
}.Build()
|
||||
File_chart_proto = out.File
|
||||
file_chart_proto_goTypes = nil
|
||||
file_chart_proto_depIdxs = nil
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package legacytypes.helmv2api;
|
||||
|
||||
import "config.proto";
|
||||
import "metadata.proto";
|
||||
import "template.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package = "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api";
|
||||
|
||||
// Chart is a helm package that contains metadata, a default config, zero or more
|
||||
// optionally parameterizable templates, and zero or more charts (dependencies).
|
||||
message Chart {
|
||||
// Contents of the Chartfile.
|
||||
helmv2api.Metadata metadata = 1;
|
||||
|
||||
// Templates for this chart.
|
||||
repeated helmv2api.Template templates = 2;
|
||||
|
||||
// Charts that this chart depends on.
|
||||
repeated Chart dependencies = 3;
|
||||
|
||||
// Default config for this template.
|
||||
helmv2api.Config values = 4;
|
||||
|
||||
// Miscellaneous files in a chart archive,
|
||||
// e.g. README, LICENSE, etc.
|
||||
repeated google.protobuf.Any files = 5;
|
||||
}
|
@@ -0,0 +1,200 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: config.proto
|
||||
|
||||
package helmv2api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Config supplies values to the parametrizable templates of a chart.
|
||||
type Config struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Raw string `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"`
|
||||
Values map[string]*Value `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Config) Reset() {
|
||||
*x = Config{}
|
||||
mi := &file_config_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Config) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Config) ProtoMessage() {}
|
||||
|
||||
func (x *Config) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_config_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Config.ProtoReflect.Descriptor instead.
|
||||
func (*Config) Descriptor() ([]byte, []int) {
|
||||
return file_config_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Config) GetRaw() string {
|
||||
if x != nil {
|
||||
return x.Raw
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Config) GetValues() map[string]*Value {
|
||||
if x != nil {
|
||||
return x.Values
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value describes a configuration value as a string.
|
||||
type Value struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Value) Reset() {
|
||||
*x = Value{}
|
||||
mi := &file_config_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Value) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Value) ProtoMessage() {}
|
||||
|
||||
func (x *Value) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_config_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Value.ProtoReflect.Descriptor instead.
|
||||
func (*Value) Descriptor() ([]byte, []int) {
|
||||
return file_config_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Value) GetValue() string {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_config_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_config_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\fconfig.proto\x12\x15legacytypes.helmv2api\"\xb6\x01\n" +
|
||||
"\x06Config\x12\x10\n" +
|
||||
"\x03raw\x18\x01 \x01(\tR\x03raw\x12A\n" +
|
||||
"\x06values\x18\x02 \x03(\v2).legacytypes.helmv2api.Config.ValuesEntryR\x06values\x1aW\n" +
|
||||
"\vValuesEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x122\n" +
|
||||
"\x05value\x18\x02 \x01(\v2\x1c.legacytypes.helmv2api.ValueR\x05value:\x028\x01\"\x1d\n" +
|
||||
"\x05Value\x12\x14\n" +
|
||||
"\x05value\x18\x01 \x01(\tR\x05valueBRZPgithub.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2apib\x06proto3"
|
||||
|
||||
var (
|
||||
file_config_proto_rawDescOnce sync.Once
|
||||
file_config_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_config_proto_rawDescGZIP() []byte {
|
||||
file_config_proto_rawDescOnce.Do(func() {
|
||||
file_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_config_proto_rawDesc), len(file_config_proto_rawDesc)))
|
||||
})
|
||||
return file_config_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_config_proto_goTypes = []any{
|
||||
(*Config)(nil), // 0: legacytypes.helmv2api.Config
|
||||
(*Value)(nil), // 1: legacytypes.helmv2api.Value
|
||||
nil, // 2: legacytypes.helmv2api.Config.ValuesEntry
|
||||
}
|
||||
var file_config_proto_depIdxs = []int32{
|
||||
2, // 0: legacytypes.helmv2api.Config.values:type_name -> legacytypes.helmv2api.Config.ValuesEntry
|
||||
1, // 1: legacytypes.helmv2api.Config.ValuesEntry.value:type_name -> legacytypes.helmv2api.Value
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_config_proto_init() }
|
||||
func file_config_proto_init() {
|
||||
if File_config_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_config_proto_rawDesc), len(file_config_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_config_proto_goTypes,
|
||||
DependencyIndexes: file_config_proto_depIdxs,
|
||||
MessageInfos: file_config_proto_msgTypes,
|
||||
}.Build()
|
||||
File_config_proto = out.File
|
||||
file_config_proto_goTypes = nil
|
||||
file_config_proto_depIdxs = nil
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package legacytypes.helmv2api;
|
||||
|
||||
option go_package = "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api";
|
||||
|
||||
// Config supplies values to the parametrizable templates of a chart.
|
||||
message Config {
|
||||
string raw = 1;
|
||||
|
||||
map<string,Value> values = 2;
|
||||
}
|
||||
|
||||
// Value describes a configuration value as a string.
|
||||
message Value {
|
||||
string value = 1;
|
||||
}
|
@@ -0,0 +1,372 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: hook.proto
|
||||
|
||||
package helmv2api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Hook_Event int32
|
||||
|
||||
const (
|
||||
Hook_UNKNOWN Hook_Event = 0
|
||||
Hook_PRE_INSTALL Hook_Event = 1
|
||||
Hook_POST_INSTALL Hook_Event = 2
|
||||
Hook_PRE_DELETE Hook_Event = 3
|
||||
Hook_POST_DELETE Hook_Event = 4
|
||||
Hook_PRE_UPGRADE Hook_Event = 5
|
||||
Hook_POST_UPGRADE Hook_Event = 6
|
||||
Hook_PRE_ROLLBACK Hook_Event = 7
|
||||
Hook_POST_ROLLBACK Hook_Event = 8
|
||||
Hook_RELEASE_TEST_SUCCESS Hook_Event = 9
|
||||
Hook_RELEASE_TEST_FAILURE Hook_Event = 10
|
||||
Hook_CRD_INSTALL Hook_Event = 11
|
||||
)
|
||||
|
||||
// Enum value maps for Hook_Event.
|
||||
var (
|
||||
Hook_Event_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "PRE_INSTALL",
|
||||
2: "POST_INSTALL",
|
||||
3: "PRE_DELETE",
|
||||
4: "POST_DELETE",
|
||||
5: "PRE_UPGRADE",
|
||||
6: "POST_UPGRADE",
|
||||
7: "PRE_ROLLBACK",
|
||||
8: "POST_ROLLBACK",
|
||||
9: "RELEASE_TEST_SUCCESS",
|
||||
10: "RELEASE_TEST_FAILURE",
|
||||
11: "CRD_INSTALL",
|
||||
}
|
||||
Hook_Event_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"PRE_INSTALL": 1,
|
||||
"POST_INSTALL": 2,
|
||||
"PRE_DELETE": 3,
|
||||
"POST_DELETE": 4,
|
||||
"PRE_UPGRADE": 5,
|
||||
"POST_UPGRADE": 6,
|
||||
"PRE_ROLLBACK": 7,
|
||||
"POST_ROLLBACK": 8,
|
||||
"RELEASE_TEST_SUCCESS": 9,
|
||||
"RELEASE_TEST_FAILURE": 10,
|
||||
"CRD_INSTALL": 11,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Hook_Event) Enum() *Hook_Event {
|
||||
p := new(Hook_Event)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Hook_Event) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Hook_Event) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_hook_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Hook_Event) Type() protoreflect.EnumType {
|
||||
return &file_hook_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x Hook_Event) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Hook_Event.Descriptor instead.
|
||||
func (Hook_Event) EnumDescriptor() ([]byte, []int) {
|
||||
return file_hook_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
type Hook_DeletePolicy int32
|
||||
|
||||
const (
|
||||
Hook_SUCCEEDED Hook_DeletePolicy = 0
|
||||
Hook_FAILED Hook_DeletePolicy = 1
|
||||
Hook_BEFORE_HOOK_CREATION Hook_DeletePolicy = 2
|
||||
)
|
||||
|
||||
// Enum value maps for Hook_DeletePolicy.
|
||||
var (
|
||||
Hook_DeletePolicy_name = map[int32]string{
|
||||
0: "SUCCEEDED",
|
||||
1: "FAILED",
|
||||
2: "BEFORE_HOOK_CREATION",
|
||||
}
|
||||
Hook_DeletePolicy_value = map[string]int32{
|
||||
"SUCCEEDED": 0,
|
||||
"FAILED": 1,
|
||||
"BEFORE_HOOK_CREATION": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Hook_DeletePolicy) Enum() *Hook_DeletePolicy {
|
||||
p := new(Hook_DeletePolicy)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Hook_DeletePolicy) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Hook_DeletePolicy) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_hook_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (Hook_DeletePolicy) Type() protoreflect.EnumType {
|
||||
return &file_hook_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x Hook_DeletePolicy) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Hook_DeletePolicy.Descriptor instead.
|
||||
func (Hook_DeletePolicy) EnumDescriptor() ([]byte, []int) {
|
||||
return file_hook_proto_rawDescGZIP(), []int{0, 1}
|
||||
}
|
||||
|
||||
// Hook defines a hook object.
|
||||
type Hook struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// Kind is the Kubernetes kind.
|
||||
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
|
||||
// Path is the chart-relative path to the template.
|
||||
Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
|
||||
// Manifest is the manifest contents.
|
||||
Manifest string `protobuf:"bytes,4,opt,name=manifest,proto3" json:"manifest,omitempty"`
|
||||
// Events are the events that this hook fires on.
|
||||
Events []Hook_Event `protobuf:"varint,5,rep,packed,name=events,proto3,enum=legacytypes.helmv2api.Hook_Event" json:"events,omitempty"`
|
||||
// LastRun indicates the date/time this was last run.
|
||||
LastRun *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_run,json=lastRun,proto3" json:"last_run,omitempty"`
|
||||
// Weight indicates the sort order for execution among similar Hook type
|
||||
Weight int32 `protobuf:"varint,7,opt,name=weight,proto3" json:"weight,omitempty"`
|
||||
// DeletePolicies are the policies that indicate when to delete the hook
|
||||
DeletePolicies []Hook_DeletePolicy `protobuf:"varint,8,rep,packed,name=delete_policies,json=deletePolicies,proto3,enum=legacytypes.helmv2api.Hook_DeletePolicy" json:"delete_policies,omitempty"`
|
||||
// DeleteTimeout indicates how long to wait for a resource to be deleted before timing out
|
||||
DeleteTimeout int64 `protobuf:"varint,9,opt,name=delete_timeout,json=deleteTimeout,proto3" json:"delete_timeout,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Hook) Reset() {
|
||||
*x = Hook{}
|
||||
mi := &file_hook_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Hook) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Hook) ProtoMessage() {}
|
||||
|
||||
func (x *Hook) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_hook_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Hook.ProtoReflect.Descriptor instead.
|
||||
func (*Hook) Descriptor() ([]byte, []int) {
|
||||
return file_hook_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Hook) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Hook) GetKind() string {
|
||||
if x != nil {
|
||||
return x.Kind
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Hook) GetPath() string {
|
||||
if x != nil {
|
||||
return x.Path
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Hook) GetManifest() string {
|
||||
if x != nil {
|
||||
return x.Manifest
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Hook) GetEvents() []Hook_Event {
|
||||
if x != nil {
|
||||
return x.Events
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Hook) GetLastRun() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.LastRun
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Hook) GetWeight() int32 {
|
||||
if x != nil {
|
||||
return x.Weight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Hook) GetDeletePolicies() []Hook_DeletePolicy {
|
||||
if x != nil {
|
||||
return x.DeletePolicies
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Hook) GetDeleteTimeout() int64 {
|
||||
if x != nil {
|
||||
return x.DeleteTimeout
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_hook_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_hook_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
"hook.proto\x12\x15legacytypes.helmv2api\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x05\n" +
|
||||
"\x04Hook\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
|
||||
"\x04kind\x18\x02 \x01(\tR\x04kind\x12\x12\n" +
|
||||
"\x04path\x18\x03 \x01(\tR\x04path\x12\x1a\n" +
|
||||
"\bmanifest\x18\x04 \x01(\tR\bmanifest\x129\n" +
|
||||
"\x06events\x18\x05 \x03(\x0e2!.legacytypes.helmv2api.Hook.EventR\x06events\x125\n" +
|
||||
"\blast_run\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\alastRun\x12\x16\n" +
|
||||
"\x06weight\x18\a \x01(\x05R\x06weight\x12Q\n" +
|
||||
"\x0fdelete_policies\x18\b \x03(\x0e2(.legacytypes.helmv2api.Hook.DeletePolicyR\x0edeletePolicies\x12%\n" +
|
||||
"\x0edelete_timeout\x18\t \x01(\x03R\rdeleteTimeout\"\xe5\x01\n" +
|
||||
"\x05Event\x12\v\n" +
|
||||
"\aUNKNOWN\x10\x00\x12\x0f\n" +
|
||||
"\vPRE_INSTALL\x10\x01\x12\x10\n" +
|
||||
"\fPOST_INSTALL\x10\x02\x12\x0e\n" +
|
||||
"\n" +
|
||||
"PRE_DELETE\x10\x03\x12\x0f\n" +
|
||||
"\vPOST_DELETE\x10\x04\x12\x0f\n" +
|
||||
"\vPRE_UPGRADE\x10\x05\x12\x10\n" +
|
||||
"\fPOST_UPGRADE\x10\x06\x12\x10\n" +
|
||||
"\fPRE_ROLLBACK\x10\a\x12\x11\n" +
|
||||
"\rPOST_ROLLBACK\x10\b\x12\x18\n" +
|
||||
"\x14RELEASE_TEST_SUCCESS\x10\t\x12\x18\n" +
|
||||
"\x14RELEASE_TEST_FAILURE\x10\n" +
|
||||
"\x12\x0f\n" +
|
||||
"\vCRD_INSTALL\x10\v\"C\n" +
|
||||
"\fDeletePolicy\x12\r\n" +
|
||||
"\tSUCCEEDED\x10\x00\x12\n" +
|
||||
"\n" +
|
||||
"\x06FAILED\x10\x01\x12\x18\n" +
|
||||
"\x14BEFORE_HOOK_CREATION\x10\x02BRZPgithub.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2apib\x06proto3"
|
||||
|
||||
var (
|
||||
file_hook_proto_rawDescOnce sync.Once
|
||||
file_hook_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_hook_proto_rawDescGZIP() []byte {
|
||||
file_hook_proto_rawDescOnce.Do(func() {
|
||||
file_hook_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_hook_proto_rawDesc), len(file_hook_proto_rawDesc)))
|
||||
})
|
||||
return file_hook_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_hook_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_hook_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_hook_proto_goTypes = []any{
|
||||
(Hook_Event)(0), // 0: legacytypes.helmv2api.Hook.Event
|
||||
(Hook_DeletePolicy)(0), // 1: legacytypes.helmv2api.Hook.DeletePolicy
|
||||
(*Hook)(nil), // 2: legacytypes.helmv2api.Hook
|
||||
(*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp
|
||||
}
|
||||
var file_hook_proto_depIdxs = []int32{
|
||||
0, // 0: legacytypes.helmv2api.Hook.events:type_name -> legacytypes.helmv2api.Hook.Event
|
||||
3, // 1: legacytypes.helmv2api.Hook.last_run:type_name -> google.protobuf.Timestamp
|
||||
1, // 2: legacytypes.helmv2api.Hook.delete_policies:type_name -> legacytypes.helmv2api.Hook.DeletePolicy
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_hook_proto_init() }
|
||||
func file_hook_proto_init() {
|
||||
if File_hook_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_hook_proto_rawDesc), len(file_hook_proto_rawDesc)),
|
||||
NumEnums: 2,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_hook_proto_goTypes,
|
||||
DependencyIndexes: file_hook_proto_depIdxs,
|
||||
EnumInfos: file_hook_proto_enumTypes,
|
||||
MessageInfos: file_hook_proto_msgTypes,
|
||||
}.Build()
|
||||
File_hook_proto = out.File
|
||||
file_hook_proto_goTypes = nil
|
||||
file_hook_proto_depIdxs = nil
|
||||
}
|
@@ -0,0 +1,61 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package legacytypes.helmv2api;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api";
|
||||
|
||||
// Hook defines a hook object.
|
||||
message Hook {
|
||||
enum Event {
|
||||
UNKNOWN = 0;
|
||||
PRE_INSTALL = 1;
|
||||
POST_INSTALL = 2;
|
||||
PRE_DELETE = 3;
|
||||
POST_DELETE = 4;
|
||||
PRE_UPGRADE = 5;
|
||||
POST_UPGRADE = 6;
|
||||
PRE_ROLLBACK = 7;
|
||||
POST_ROLLBACK = 8;
|
||||
RELEASE_TEST_SUCCESS = 9;
|
||||
RELEASE_TEST_FAILURE = 10;
|
||||
CRD_INSTALL = 11;
|
||||
}
|
||||
enum DeletePolicy {
|
||||
SUCCEEDED = 0;
|
||||
FAILED = 1;
|
||||
BEFORE_HOOK_CREATION = 2;
|
||||
}
|
||||
string name = 1;
|
||||
// Kind is the Kubernetes kind.
|
||||
string kind = 2;
|
||||
// Path is the chart-relative path to the template.
|
||||
string path = 3;
|
||||
// Manifest is the manifest contents.
|
||||
string manifest = 4;
|
||||
// Events are the events that this hook fires on.
|
||||
repeated Event events = 5;
|
||||
// LastRun indicates the date/time this was last run.
|
||||
google.protobuf.Timestamp last_run = 6;
|
||||
// Weight indicates the sort order for execution among similar Hook type
|
||||
int32 weight = 7;
|
||||
// DeletePolicies are the policies that indicate when to delete the hook
|
||||
repeated DeletePolicy delete_policies = 8;
|
||||
// DeleteTimeout indicates how long to wait for a resource to be deleted before timing out
|
||||
int64 delete_timeout = 9;
|
||||
}
|
@@ -0,0 +1,184 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: info.proto
|
||||
|
||||
package helmv2api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Info describes release information.
|
||||
type Info struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
|
||||
FirstDeployed *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=first_deployed,json=firstDeployed,proto3" json:"first_deployed,omitempty"`
|
||||
LastDeployed *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_deployed,json=lastDeployed,proto3" json:"last_deployed,omitempty"`
|
||||
// Deleted tracks when this object was deleted.
|
||||
Deleted *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deleted,proto3" json:"deleted,omitempty"`
|
||||
// Description is human-friendly "log entry" about this release.
|
||||
Description string `protobuf:"bytes,5,opt,name=Description,proto3" json:"Description,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Info) Reset() {
|
||||
*x = Info{}
|
||||
mi := &file_info_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Info) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Info) ProtoMessage() {}
|
||||
|
||||
func (x *Info) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_info_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Info.ProtoReflect.Descriptor instead.
|
||||
func (*Info) Descriptor() ([]byte, []int) {
|
||||
return file_info_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Info) GetStatus() *Status {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Info) GetFirstDeployed() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.FirstDeployed
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Info) GetLastDeployed() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.LastDeployed
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Info) GetDeleted() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Deleted
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Info) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_info_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_info_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
"info.proto\x12\x15legacytypes.helmv2api\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\fstatus.proto\"\x99\x02\n" +
|
||||
"\x04Info\x125\n" +
|
||||
"\x06status\x18\x01 \x01(\v2\x1d.legacytypes.helmv2api.StatusR\x06status\x12A\n" +
|
||||
"\x0efirst_deployed\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\rfirstDeployed\x12?\n" +
|
||||
"\rlast_deployed\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\flastDeployed\x124\n" +
|
||||
"\adeleted\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\adeleted\x12 \n" +
|
||||
"\vDescription\x18\x05 \x01(\tR\vDescriptionBRZPgithub.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2apib\x06proto3"
|
||||
|
||||
var (
|
||||
file_info_proto_rawDescOnce sync.Once
|
||||
file_info_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_info_proto_rawDescGZIP() []byte {
|
||||
file_info_proto_rawDescOnce.Do(func() {
|
||||
file_info_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_info_proto_rawDesc), len(file_info_proto_rawDesc)))
|
||||
})
|
||||
return file_info_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_info_proto_goTypes = []any{
|
||||
(*Info)(nil), // 0: legacytypes.helmv2api.Info
|
||||
(*Status)(nil), // 1: legacytypes.helmv2api.Status
|
||||
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
|
||||
}
|
||||
var file_info_proto_depIdxs = []int32{
|
||||
1, // 0: legacytypes.helmv2api.Info.status:type_name -> legacytypes.helmv2api.Status
|
||||
2, // 1: legacytypes.helmv2api.Info.first_deployed:type_name -> google.protobuf.Timestamp
|
||||
2, // 2: legacytypes.helmv2api.Info.last_deployed:type_name -> google.protobuf.Timestamp
|
||||
2, // 3: legacytypes.helmv2api.Info.deleted:type_name -> google.protobuf.Timestamp
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_info_proto_init() }
|
||||
func file_info_proto_init() {
|
||||
if File_info_proto != nil {
|
||||
return
|
||||
}
|
||||
file_status_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_info_proto_rawDesc), len(file_info_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_info_proto_goTypes,
|
||||
DependencyIndexes: file_info_proto_depIdxs,
|
||||
MessageInfos: file_info_proto_msgTypes,
|
||||
}.Build()
|
||||
File_info_proto = out.File
|
||||
file_info_proto_goTypes = nil
|
||||
file_info_proto_depIdxs = nil
|
||||
}
|
@@ -0,0 +1,37 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package legacytypes.helmv2api;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "status.proto";
|
||||
|
||||
option go_package = "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api";
|
||||
|
||||
// Info describes release information.
|
||||
message Info {
|
||||
Status status = 1;
|
||||
|
||||
google.protobuf.Timestamp first_deployed = 2;
|
||||
|
||||
google.protobuf.Timestamp last_deployed = 3;
|
||||
|
||||
// Deleted tracks when this object was deleted.
|
||||
google.protobuf.Timestamp deleted = 4;
|
||||
|
||||
// Description is human-friendly "log entry" about this release.
|
||||
string Description = 5;
|
||||
}
|
@@ -0,0 +1,437 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: metadata.proto
|
||||
|
||||
package helmv2api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Metadata_Engine int32
|
||||
|
||||
const (
|
||||
Metadata_UNKNOWN Metadata_Engine = 0
|
||||
Metadata_GOTPL Metadata_Engine = 1
|
||||
)
|
||||
|
||||
// Enum value maps for Metadata_Engine.
|
||||
var (
|
||||
Metadata_Engine_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "GOTPL",
|
||||
}
|
||||
Metadata_Engine_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"GOTPL": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Metadata_Engine) Enum() *Metadata_Engine {
|
||||
p := new(Metadata_Engine)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Metadata_Engine) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Metadata_Engine) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_metadata_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Metadata_Engine) Type() protoreflect.EnumType {
|
||||
return &file_metadata_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x Metadata_Engine) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Metadata_Engine.Descriptor instead.
|
||||
func (Metadata_Engine) EnumDescriptor() ([]byte, []int) {
|
||||
return file_metadata_proto_rawDescGZIP(), []int{1, 0}
|
||||
}
|
||||
|
||||
// Maintainer describes a Chart maintainer.
|
||||
type Maintainer struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// Name is a user name or organization name
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// Email is an optional email address to contact the named maintainer
|
||||
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
|
||||
// Url is an optional URL to an address for the named maintainer
|
||||
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Maintainer) Reset() {
|
||||
*x = Maintainer{}
|
||||
mi := &file_metadata_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Maintainer) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Maintainer) ProtoMessage() {}
|
||||
|
||||
func (x *Maintainer) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_metadata_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Maintainer.ProtoReflect.Descriptor instead.
|
||||
func (*Maintainer) Descriptor() ([]byte, []int) {
|
||||
return file_metadata_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Maintainer) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Maintainer) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Maintainer) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Metadata for a Chart file. This models the structure of a Chart.yaml file.
|
||||
//
|
||||
// Spec: https://k8s.io/helm/blob/master/docs/design/chart_format.md#the-chart-file
|
||||
type Metadata struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The name of the chart
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// The URL to a relevant project page, git repo, or contact person
|
||||
Home string `protobuf:"bytes,2,opt,name=home,proto3" json:"home,omitempty"`
|
||||
// Source is the URL to the source code of this chart
|
||||
Sources []string `protobuf:"bytes,3,rep,name=sources,proto3" json:"sources,omitempty"`
|
||||
// A SemVer 2 conformant version string of the chart
|
||||
Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
|
||||
// A one-sentence description of the chart
|
||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
||||
// A list of string keywords
|
||||
Keywords []string `protobuf:"bytes,6,rep,name=keywords,proto3" json:"keywords,omitempty"`
|
||||
// A list of name and URL/email address combinations for the maintainer(s)
|
||||
Maintainers []*Maintainer `protobuf:"bytes,7,rep,name=maintainers,proto3" json:"maintainers,omitempty"`
|
||||
// The name of the template engine to use. Defaults to 'gotpl'.
|
||||
Engine string `protobuf:"bytes,8,opt,name=engine,proto3" json:"engine,omitempty"`
|
||||
// The URL to an icon file.
|
||||
Icon string `protobuf:"bytes,9,opt,name=icon,proto3" json:"icon,omitempty"`
|
||||
// The API Version of this chart.
|
||||
ApiVersion string `protobuf:"bytes,10,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"`
|
||||
// The condition to check to enable chart
|
||||
Condition string `protobuf:"bytes,11,opt,name=condition,proto3" json:"condition,omitempty"`
|
||||
// The tags to check to enable chart
|
||||
Tags string `protobuf:"bytes,12,opt,name=tags,proto3" json:"tags,omitempty"`
|
||||
// The version of the application enclosed inside of this chart.
|
||||
AppVersion string `protobuf:"bytes,13,opt,name=appVersion,proto3" json:"appVersion,omitempty"`
|
||||
// Whether or not this chart is deprecated
|
||||
Deprecated bool `protobuf:"varint,14,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
|
||||
// TillerVersion is a SemVer constraints on what version of Tiller is required.
|
||||
// See SemVer ranges here: https://github.com/Masterminds/semver#basic-comparisons
|
||||
TillerVersion string `protobuf:"bytes,15,opt,name=tillerVersion,proto3" json:"tillerVersion,omitempty"`
|
||||
// Annotations are additional mappings uninterpreted by Tiller,
|
||||
// made available for inspection by other applications.
|
||||
Annotations map[string]string `protobuf:"bytes,16,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
// KubeVersion is a SemVer constraint specifying the version of Kubernetes required.
|
||||
KubeVersion string `protobuf:"bytes,17,opt,name=kubeVersion,proto3" json:"kubeVersion,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Metadata) Reset() {
|
||||
*x = Metadata{}
|
||||
mi := &file_metadata_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Metadata) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Metadata) ProtoMessage() {}
|
||||
|
||||
func (x *Metadata) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_metadata_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Metadata.ProtoReflect.Descriptor instead.
|
||||
func (*Metadata) Descriptor() ([]byte, []int) {
|
||||
return file_metadata_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Metadata) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetHome() string {
|
||||
if x != nil {
|
||||
return x.Home
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetSources() []string {
|
||||
if x != nil {
|
||||
return x.Sources
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Metadata) GetVersion() string {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetKeywords() []string {
|
||||
if x != nil {
|
||||
return x.Keywords
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Metadata) GetMaintainers() []*Maintainer {
|
||||
if x != nil {
|
||||
return x.Maintainers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Metadata) GetEngine() string {
|
||||
if x != nil {
|
||||
return x.Engine
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetIcon() string {
|
||||
if x != nil {
|
||||
return x.Icon
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetApiVersion() string {
|
||||
if x != nil {
|
||||
return x.ApiVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetCondition() string {
|
||||
if x != nil {
|
||||
return x.Condition
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetTags() string {
|
||||
if x != nil {
|
||||
return x.Tags
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetAppVersion() string {
|
||||
if x != nil {
|
||||
return x.AppVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetDeprecated() bool {
|
||||
if x != nil {
|
||||
return x.Deprecated
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Metadata) GetTillerVersion() string {
|
||||
if x != nil {
|
||||
return x.TillerVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Metadata) GetAnnotations() map[string]string {
|
||||
if x != nil {
|
||||
return x.Annotations
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Metadata) GetKubeVersion() string {
|
||||
if x != nil {
|
||||
return x.KubeVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_metadata_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_metadata_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0emetadata.proto\x12\x15legacytypes.helmv2api\"H\n" +
|
||||
"\n" +
|
||||
"Maintainer\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
|
||||
"\x05email\x18\x02 \x01(\tR\x05email\x12\x10\n" +
|
||||
"\x03url\x18\x03 \x01(\tR\x03url\"\xa5\x05\n" +
|
||||
"\bMetadata\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
|
||||
"\x04home\x18\x02 \x01(\tR\x04home\x12\x18\n" +
|
||||
"\asources\x18\x03 \x03(\tR\asources\x12\x18\n" +
|
||||
"\aversion\x18\x04 \x01(\tR\aversion\x12 \n" +
|
||||
"\vdescription\x18\x05 \x01(\tR\vdescription\x12\x1a\n" +
|
||||
"\bkeywords\x18\x06 \x03(\tR\bkeywords\x12C\n" +
|
||||
"\vmaintainers\x18\a \x03(\v2!.legacytypes.helmv2api.MaintainerR\vmaintainers\x12\x16\n" +
|
||||
"\x06engine\x18\b \x01(\tR\x06engine\x12\x12\n" +
|
||||
"\x04icon\x18\t \x01(\tR\x04icon\x12\x1e\n" +
|
||||
"\n" +
|
||||
"apiVersion\x18\n" +
|
||||
" \x01(\tR\n" +
|
||||
"apiVersion\x12\x1c\n" +
|
||||
"\tcondition\x18\v \x01(\tR\tcondition\x12\x12\n" +
|
||||
"\x04tags\x18\f \x01(\tR\x04tags\x12\x1e\n" +
|
||||
"\n" +
|
||||
"appVersion\x18\r \x01(\tR\n" +
|
||||
"appVersion\x12\x1e\n" +
|
||||
"\n" +
|
||||
"deprecated\x18\x0e \x01(\bR\n" +
|
||||
"deprecated\x12$\n" +
|
||||
"\rtillerVersion\x18\x0f \x01(\tR\rtillerVersion\x12R\n" +
|
||||
"\vannotations\x18\x10 \x03(\v20.legacytypes.helmv2api.Metadata.AnnotationsEntryR\vannotations\x12 \n" +
|
||||
"\vkubeVersion\x18\x11 \x01(\tR\vkubeVersion\x1a>\n" +
|
||||
"\x10AnnotationsEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\" \n" +
|
||||
"\x06Engine\x12\v\n" +
|
||||
"\aUNKNOWN\x10\x00\x12\t\n" +
|
||||
"\x05GOTPL\x10\x01BRZPgithub.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2apib\x06proto3"
|
||||
|
||||
var (
|
||||
file_metadata_proto_rawDescOnce sync.Once
|
||||
file_metadata_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_metadata_proto_rawDescGZIP() []byte {
|
||||
file_metadata_proto_rawDescOnce.Do(func() {
|
||||
file_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_metadata_proto_rawDesc), len(file_metadata_proto_rawDesc)))
|
||||
})
|
||||
return file_metadata_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_metadata_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_metadata_proto_goTypes = []any{
|
||||
(Metadata_Engine)(0), // 0: legacytypes.helmv2api.Metadata.Engine
|
||||
(*Maintainer)(nil), // 1: legacytypes.helmv2api.Maintainer
|
||||
(*Metadata)(nil), // 2: legacytypes.helmv2api.Metadata
|
||||
nil, // 3: legacytypes.helmv2api.Metadata.AnnotationsEntry
|
||||
}
|
||||
var file_metadata_proto_depIdxs = []int32{
|
||||
1, // 0: legacytypes.helmv2api.Metadata.maintainers:type_name -> legacytypes.helmv2api.Maintainer
|
||||
3, // 1: legacytypes.helmv2api.Metadata.annotations:type_name -> legacytypes.helmv2api.Metadata.AnnotationsEntry
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_metadata_proto_init() }
|
||||
func file_metadata_proto_init() {
|
||||
if File_metadata_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_metadata_proto_rawDesc), len(file_metadata_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_metadata_proto_goTypes,
|
||||
DependencyIndexes: file_metadata_proto_depIdxs,
|
||||
EnumInfos: file_metadata_proto_enumTypes,
|
||||
MessageInfos: file_metadata_proto_msgTypes,
|
||||
}.Build()
|
||||
File_metadata_proto = out.File
|
||||
file_metadata_proto_goTypes = nil
|
||||
file_metadata_proto_depIdxs = nil
|
||||
}
|
@@ -0,0 +1,93 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package legacytypes.helmv2api;
|
||||
|
||||
option go_package = "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api";
|
||||
|
||||
// Maintainer describes a Chart maintainer.
|
||||
message Maintainer {
|
||||
// Name is a user name or organization name
|
||||
string name = 1;
|
||||
|
||||
// Email is an optional email address to contact the named maintainer
|
||||
string email = 2;
|
||||
|
||||
// Url is an optional URL to an address for the named maintainer
|
||||
string url = 3;
|
||||
}
|
||||
|
||||
// Metadata for a Chart file. This models the structure of a Chart.yaml file.
|
||||
//
|
||||
// Spec: https://k8s.io/helm/blob/master/docs/design/chart_format.md#the-chart-file
|
||||
message Metadata {
|
||||
enum Engine {
|
||||
UNKNOWN = 0;
|
||||
GOTPL = 1;
|
||||
}
|
||||
// The name of the chart
|
||||
string name = 1;
|
||||
|
||||
// The URL to a relevant project page, git repo, or contact person
|
||||
string home = 2;
|
||||
|
||||
// Source is the URL to the source code of this chart
|
||||
repeated string sources = 3;
|
||||
|
||||
// A SemVer 2 conformant version string of the chart
|
||||
string version = 4;
|
||||
|
||||
// A one-sentence description of the chart
|
||||
string description = 5;
|
||||
|
||||
// A list of string keywords
|
||||
repeated string keywords = 6;
|
||||
|
||||
// A list of name and URL/email address combinations for the maintainer(s)
|
||||
repeated Maintainer maintainers = 7;
|
||||
|
||||
// The name of the template engine to use. Defaults to 'gotpl'.
|
||||
string engine = 8;
|
||||
|
||||
// The URL to an icon file.
|
||||
string icon = 9;
|
||||
|
||||
// The API Version of this chart.
|
||||
string apiVersion = 10;
|
||||
|
||||
// The condition to check to enable chart
|
||||
string condition = 11;
|
||||
|
||||
// The tags to check to enable chart
|
||||
string tags = 12;
|
||||
|
||||
// The version of the application enclosed inside of this chart.
|
||||
string appVersion = 13;
|
||||
|
||||
// Whether or not this chart is deprecated
|
||||
bool deprecated = 14;
|
||||
|
||||
// TillerVersion is a SemVer constraints on what version of Tiller is required.
|
||||
// See SemVer ranges here: https://github.com/Masterminds/semver#basic-comparisons
|
||||
string tillerVersion = 15;
|
||||
|
||||
// Annotations are additional mappings uninterpreted by Tiller,
|
||||
// made available for inspection by other applications.
|
||||
map<string,string> annotations = 16;
|
||||
|
||||
// KubeVersion is a SemVer constraint specifying the version of Kubernetes required.
|
||||
string kubeVersion = 17;
|
||||
}
|
@@ -0,0 +1,224 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: release.proto
|
||||
|
||||
package helmv2api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Release describes a deployment of a chart, together with the chart
|
||||
// and the variables used to deploy that chart.
|
||||
type Release struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// Name is the name of the release
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// Info provides information about a release
|
||||
Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
|
||||
// Chart is the chart that was released.
|
||||
Chart *Chart `protobuf:"bytes,3,opt,name=chart,proto3" json:"chart,omitempty"`
|
||||
// Config is the set of extra Values added to the chart.
|
||||
// These values override the default values inside of the chart.
|
||||
Config *Config `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
|
||||
// Manifest is the string representation of the rendered template.
|
||||
Manifest string `protobuf:"bytes,5,opt,name=manifest,proto3" json:"manifest,omitempty"`
|
||||
// Hooks are all of the hooks declared for this release.
|
||||
Hooks []*Hook `protobuf:"bytes,6,rep,name=hooks,proto3" json:"hooks,omitempty"`
|
||||
// Version is an int32 which represents the version of the release.
|
||||
Version int32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"`
|
||||
// Namespace is the kubernetes namespace of the release.
|
||||
Namespace string `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Release) Reset() {
|
||||
*x = Release{}
|
||||
mi := &file_release_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Release) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Release) ProtoMessage() {}
|
||||
|
||||
func (x *Release) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_release_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Release.ProtoReflect.Descriptor instead.
|
||||
func (*Release) Descriptor() ([]byte, []int) {
|
||||
return file_release_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Release) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Release) GetInfo() *Info {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Release) GetChart() *Chart {
|
||||
if x != nil {
|
||||
return x.Chart
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Release) GetConfig() *Config {
|
||||
if x != nil {
|
||||
return x.Config
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Release) GetManifest() string {
|
||||
if x != nil {
|
||||
return x.Manifest
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Release) GetHooks() []*Hook {
|
||||
if x != nil {
|
||||
return x.Hooks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Release) GetVersion() int32 {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Release) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_release_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_release_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\rrelease.proto\x12\x15legacytypes.helmv2api\x1a\n" +
|
||||
"hook.proto\x1a\n" +
|
||||
"info.proto\x1a\fconfig.proto\x1a\vchart.proto\"\xc0\x02\n" +
|
||||
"\aRelease\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12/\n" +
|
||||
"\x04info\x18\x02 \x01(\v2\x1b.legacytypes.helmv2api.InfoR\x04info\x122\n" +
|
||||
"\x05chart\x18\x03 \x01(\v2\x1c.legacytypes.helmv2api.ChartR\x05chart\x125\n" +
|
||||
"\x06config\x18\x04 \x01(\v2\x1d.legacytypes.helmv2api.ConfigR\x06config\x12\x1a\n" +
|
||||
"\bmanifest\x18\x05 \x01(\tR\bmanifest\x121\n" +
|
||||
"\x05hooks\x18\x06 \x03(\v2\x1b.legacytypes.helmv2api.HookR\x05hooks\x12\x18\n" +
|
||||
"\aversion\x18\a \x01(\x05R\aversion\x12\x1c\n" +
|
||||
"\tnamespace\x18\b \x01(\tR\tnamespaceBRZPgithub.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2apib\x06proto3"
|
||||
|
||||
var (
|
||||
file_release_proto_rawDescOnce sync.Once
|
||||
file_release_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_release_proto_rawDescGZIP() []byte {
|
||||
file_release_proto_rawDescOnce.Do(func() {
|
||||
file_release_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_release_proto_rawDesc), len(file_release_proto_rawDesc)))
|
||||
})
|
||||
return file_release_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_release_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_release_proto_goTypes = []any{
|
||||
(*Release)(nil), // 0: legacytypes.helmv2api.Release
|
||||
(*Info)(nil), // 1: legacytypes.helmv2api.Info
|
||||
(*Chart)(nil), // 2: legacytypes.helmv2api.Chart
|
||||
(*Config)(nil), // 3: legacytypes.helmv2api.Config
|
||||
(*Hook)(nil), // 4: legacytypes.helmv2api.Hook
|
||||
}
|
||||
var file_release_proto_depIdxs = []int32{
|
||||
1, // 0: legacytypes.helmv2api.Release.info:type_name -> legacytypes.helmv2api.Info
|
||||
2, // 1: legacytypes.helmv2api.Release.chart:type_name -> legacytypes.helmv2api.Chart
|
||||
3, // 2: legacytypes.helmv2api.Release.config:type_name -> legacytypes.helmv2api.Config
|
||||
4, // 3: legacytypes.helmv2api.Release.hooks:type_name -> legacytypes.helmv2api.Hook
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_release_proto_init() }
|
||||
func file_release_proto_init() {
|
||||
if File_release_proto != nil {
|
||||
return
|
||||
}
|
||||
file_hook_proto_init()
|
||||
file_info_proto_init()
|
||||
file_config_proto_init()
|
||||
file_chart_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_release_proto_rawDesc), len(file_release_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_release_proto_goTypes,
|
||||
DependencyIndexes: file_release_proto_depIdxs,
|
||||
MessageInfos: file_release_proto_msgTypes,
|
||||
}.Build()
|
||||
File_release_proto = out.File
|
||||
file_release_proto_goTypes = nil
|
||||
file_release_proto_depIdxs = nil
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package legacytypes.helmv2api;
|
||||
|
||||
import "hook.proto";
|
||||
import "info.proto";
|
||||
import "config.proto";
|
||||
import "chart.proto";
|
||||
|
||||
option go_package = "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api";
|
||||
|
||||
// Release describes a deployment of a chart, together with the chart
|
||||
// and the variables used to deploy that chart.
|
||||
message Release {
|
||||
// Name is the name of the release
|
||||
string name = 1;
|
||||
|
||||
// Info provides information about a release
|
||||
helmv2api.Info info = 2;
|
||||
|
||||
// Chart is the chart that was released.
|
||||
helmv2api.Chart chart = 3;
|
||||
|
||||
// Config is the set of extra Values added to the chart.
|
||||
// These values override the default values inside of the chart.
|
||||
helmv2api.Config config = 4;
|
||||
|
||||
// Manifest is the string representation of the rendered template.
|
||||
string manifest = 5;
|
||||
|
||||
// Hooks are all of the hooks declared for this release.
|
||||
repeated helmv2api.Hook hooks = 6;
|
||||
|
||||
// Version is an int32 which represents the version of the release.
|
||||
int32 version = 7;
|
||||
|
||||
// Namespace is the kubernetes namespace of the release.
|
||||
string namespace = 8;
|
||||
}
|
@@ -0,0 +1,262 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: status.proto
|
||||
|
||||
package helmv2api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Status_Code int32
|
||||
|
||||
const (
|
||||
// Status_UNKNOWN indicates that a release is in an uncertain state.
|
||||
Status_UNKNOWN Status_Code = 0
|
||||
// Status_DEPLOYED indicates that the release has been pushed to Kubernetes.
|
||||
Status_DEPLOYED Status_Code = 1
|
||||
// Status_DELETED indicates that a release has been deleted from Kubernetes.
|
||||
Status_DELETED Status_Code = 2
|
||||
// Status_SUPERSEDED indicates that this release object is outdated and a newer one exists.
|
||||
Status_SUPERSEDED Status_Code = 3
|
||||
// Status_FAILED indicates that the release was not successfully deployed.
|
||||
Status_FAILED Status_Code = 4
|
||||
// Status_DELETING indicates that a delete operation is underway.
|
||||
Status_DELETING Status_Code = 5
|
||||
// Status_PENDING_INSTALL indicates that an install operation is underway.
|
||||
Status_PENDING_INSTALL Status_Code = 6
|
||||
// Status_PENDING_UPGRADE indicates that an upgrade operation is underway.
|
||||
Status_PENDING_UPGRADE Status_Code = 7
|
||||
// Status_PENDING_ROLLBACK indicates that a rollback operation is underway.
|
||||
Status_PENDING_ROLLBACK Status_Code = 8
|
||||
)
|
||||
|
||||
// Enum value maps for Status_Code.
|
||||
var (
|
||||
Status_Code_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "DEPLOYED",
|
||||
2: "DELETED",
|
||||
3: "SUPERSEDED",
|
||||
4: "FAILED",
|
||||
5: "DELETING",
|
||||
6: "PENDING_INSTALL",
|
||||
7: "PENDING_UPGRADE",
|
||||
8: "PENDING_ROLLBACK",
|
||||
}
|
||||
Status_Code_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"DEPLOYED": 1,
|
||||
"DELETED": 2,
|
||||
"SUPERSEDED": 3,
|
||||
"FAILED": 4,
|
||||
"DELETING": 5,
|
||||
"PENDING_INSTALL": 6,
|
||||
"PENDING_UPGRADE": 7,
|
||||
"PENDING_ROLLBACK": 8,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Status_Code) Enum() *Status_Code {
|
||||
p := new(Status_Code)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Status_Code) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Status_Code) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_status_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Status_Code) Type() protoreflect.EnumType {
|
||||
return &file_status_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x Status_Code) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Status_Code.Descriptor instead.
|
||||
func (Status_Code) EnumDescriptor() ([]byte, []int) {
|
||||
return file_status_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
// Status defines the status of a release.
|
||||
type Status struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Code Status_Code `protobuf:"varint,1,opt,name=code,proto3,enum=legacytypes.helmv2api.Status_Code" json:"code,omitempty"`
|
||||
// Cluster resources as kubectl would print them.
|
||||
Resources string `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"`
|
||||
// Contains the rendered templates/NOTES.txt if available
|
||||
Notes string `protobuf:"bytes,4,opt,name=notes,proto3" json:"notes,omitempty"`
|
||||
// LastTestSuiteRun provides results on the last test run on a release
|
||||
LastTestSuiteRun *TestSuite `protobuf:"bytes,5,opt,name=last_test_suite_run,json=lastTestSuiteRun,proto3" json:"last_test_suite_run,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Status) Reset() {
|
||||
*x = Status{}
|
||||
mi := &file_status_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Status) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Status) ProtoMessage() {}
|
||||
|
||||
func (x *Status) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_status_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Status.ProtoReflect.Descriptor instead.
|
||||
func (*Status) Descriptor() ([]byte, []int) {
|
||||
return file_status_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Status) GetCode() Status_Code {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return Status_UNKNOWN
|
||||
}
|
||||
|
||||
func (x *Status) GetResources() string {
|
||||
if x != nil {
|
||||
return x.Resources
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Status) GetNotes() string {
|
||||
if x != nil {
|
||||
return x.Notes
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Status) GetLastTestSuiteRun() *TestSuite {
|
||||
if x != nil {
|
||||
return x.LastTestSuiteRun
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_status_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_status_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\fstatus.proto\x12\x15legacytypes.helmv2api\x1a\x10test_suite.proto\"\xe0\x02\n" +
|
||||
"\x06Status\x126\n" +
|
||||
"\x04code\x18\x01 \x01(\x0e2\".legacytypes.helmv2api.Status.CodeR\x04code\x12\x1c\n" +
|
||||
"\tresources\x18\x03 \x01(\tR\tresources\x12\x14\n" +
|
||||
"\x05notes\x18\x04 \x01(\tR\x05notes\x12O\n" +
|
||||
"\x13last_test_suite_run\x18\x05 \x01(\v2 .legacytypes.helmv2api.TestSuiteR\x10lastTestSuiteRun\"\x98\x01\n" +
|
||||
"\x04Code\x12\v\n" +
|
||||
"\aUNKNOWN\x10\x00\x12\f\n" +
|
||||
"\bDEPLOYED\x10\x01\x12\v\n" +
|
||||
"\aDELETED\x10\x02\x12\x0e\n" +
|
||||
"\n" +
|
||||
"SUPERSEDED\x10\x03\x12\n" +
|
||||
"\n" +
|
||||
"\x06FAILED\x10\x04\x12\f\n" +
|
||||
"\bDELETING\x10\x05\x12\x13\n" +
|
||||
"\x0fPENDING_INSTALL\x10\x06\x12\x13\n" +
|
||||
"\x0fPENDING_UPGRADE\x10\a\x12\x14\n" +
|
||||
"\x10PENDING_ROLLBACK\x10\bBRZPgithub.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2apib\x06proto3"
|
||||
|
||||
var (
|
||||
file_status_proto_rawDescOnce sync.Once
|
||||
file_status_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_status_proto_rawDescGZIP() []byte {
|
||||
file_status_proto_rawDescOnce.Do(func() {
|
||||
file_status_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_status_proto_rawDesc), len(file_status_proto_rawDesc)))
|
||||
})
|
||||
return file_status_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_status_proto_goTypes = []any{
|
||||
(Status_Code)(0), // 0: legacytypes.helmv2api.Status.Code
|
||||
(*Status)(nil), // 1: legacytypes.helmv2api.Status
|
||||
(*TestSuite)(nil), // 2: legacytypes.helmv2api.TestSuite
|
||||
}
|
||||
var file_status_proto_depIdxs = []int32{
|
||||
0, // 0: legacytypes.helmv2api.Status.code:type_name -> legacytypes.helmv2api.Status.Code
|
||||
2, // 1: legacytypes.helmv2api.Status.last_test_suite_run:type_name -> legacytypes.helmv2api.TestSuite
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_status_proto_init() }
|
||||
func file_status_proto_init() {
|
||||
if File_status_proto != nil {
|
||||
return
|
||||
}
|
||||
file_test_suite_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_status_proto_rawDesc), len(file_status_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_status_proto_goTypes,
|
||||
DependencyIndexes: file_status_proto_depIdxs,
|
||||
EnumInfos: file_status_proto_enumTypes,
|
||||
MessageInfos: file_status_proto_msgTypes,
|
||||
}.Build()
|
||||
File_status_proto = out.File
|
||||
file_status_proto_goTypes = nil
|
||||
file_status_proto_depIdxs = nil
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package legacytypes.helmv2api;
|
||||
|
||||
import "test_suite.proto";
|
||||
|
||||
option go_package = "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api";
|
||||
|
||||
// Status defines the status of a release.
|
||||
message Status {
|
||||
enum Code {
|
||||
// Status_UNKNOWN indicates that a release is in an uncertain state.
|
||||
UNKNOWN = 0;
|
||||
// Status_DEPLOYED indicates that the release has been pushed to Kubernetes.
|
||||
DEPLOYED = 1;
|
||||
// Status_DELETED indicates that a release has been deleted from Kubernetes.
|
||||
DELETED = 2;
|
||||
// Status_SUPERSEDED indicates that this release object is outdated and a newer one exists.
|
||||
SUPERSEDED = 3;
|
||||
// Status_FAILED indicates that the release was not successfully deployed.
|
||||
FAILED = 4;
|
||||
// Status_DELETING indicates that a delete operation is underway.
|
||||
DELETING = 5;
|
||||
// Status_PENDING_INSTALL indicates that an install operation is underway.
|
||||
PENDING_INSTALL = 6;
|
||||
// Status_PENDING_UPGRADE indicates that an upgrade operation is underway.
|
||||
PENDING_UPGRADE = 7;
|
||||
// Status_PENDING_ROLLBACK indicates that a rollback operation is underway.
|
||||
PENDING_ROLLBACK = 8;
|
||||
}
|
||||
|
||||
Code code = 1;
|
||||
|
||||
// Deprecated
|
||||
// google.protobuf.Any details = 2;
|
||||
|
||||
// Cluster resources as kubectl would print them.
|
||||
string resources = 3;
|
||||
|
||||
// Contains the rendered templates/NOTES.txt if available
|
||||
string notes = 4;
|
||||
|
||||
// LastTestSuiteRun provides results on the last test run on a release
|
||||
helmv2api.TestSuite last_test_suite_run = 5;
|
||||
}
|
@@ -0,0 +1,151 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: template.proto
|
||||
|
||||
package helmv2api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Template represents a template as a name/value pair.
|
||||
//
|
||||
// By convention, name is a relative path within the scope of the chart's
|
||||
// base directory.
|
||||
type Template struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// Name is the path-like name of the template.
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// Data is the template as byte data.
|
||||
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Template) Reset() {
|
||||
*x = Template{}
|
||||
mi := &file_template_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Template) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Template) ProtoMessage() {}
|
||||
|
||||
func (x *Template) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_template_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Template.ProtoReflect.Descriptor instead.
|
||||
func (*Template) Descriptor() ([]byte, []int) {
|
||||
return file_template_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Template) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Template) GetData() []byte {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_template_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_template_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0etemplate.proto\x12\x15legacytypes.helmv2api\"2\n" +
|
||||
"\bTemplate\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
|
||||
"\x04data\x18\x02 \x01(\fR\x04dataBRZPgithub.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2apib\x06proto3"
|
||||
|
||||
var (
|
||||
file_template_proto_rawDescOnce sync.Once
|
||||
file_template_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_template_proto_rawDescGZIP() []byte {
|
||||
file_template_proto_rawDescOnce.Do(func() {
|
||||
file_template_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_template_proto_rawDesc), len(file_template_proto_rawDesc)))
|
||||
})
|
||||
return file_template_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_template_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_template_proto_goTypes = []any{
|
||||
(*Template)(nil), // 0: legacytypes.helmv2api.Template
|
||||
}
|
||||
var file_template_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_template_proto_init() }
|
||||
func file_template_proto_init() {
|
||||
if File_template_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_template_proto_rawDesc), len(file_template_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_template_proto_goTypes,
|
||||
DependencyIndexes: file_template_proto_depIdxs,
|
||||
MessageInfos: file_template_proto_msgTypes,
|
||||
}.Build()
|
||||
File_template_proto = out.File
|
||||
file_template_proto_goTypes = nil
|
||||
file_template_proto_depIdxs = nil
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package legacytypes.helmv2api;
|
||||
|
||||
option go_package = "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api";
|
||||
|
||||
// Template represents a template as a name/value pair.
|
||||
//
|
||||
// By convention, name is a relative path within the scope of the chart's
|
||||
// base directory.
|
||||
message Template {
|
||||
// Name is the path-like name of the template.
|
||||
string name = 1;
|
||||
|
||||
// Data is the template as byte data.
|
||||
bytes data = 2;
|
||||
}
|
@@ -0,0 +1,238 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: test_run.proto
|
||||
|
||||
package helmv2api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type TestRun_Status int32
|
||||
|
||||
const (
|
||||
TestRun_UNKNOWN TestRun_Status = 0
|
||||
TestRun_SUCCESS TestRun_Status = 1
|
||||
TestRun_FAILURE TestRun_Status = 2
|
||||
TestRun_RUNNING TestRun_Status = 3
|
||||
)
|
||||
|
||||
// Enum value maps for TestRun_Status.
|
||||
var (
|
||||
TestRun_Status_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "SUCCESS",
|
||||
2: "FAILURE",
|
||||
3: "RUNNING",
|
||||
}
|
||||
TestRun_Status_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"SUCCESS": 1,
|
||||
"FAILURE": 2,
|
||||
"RUNNING": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x TestRun_Status) Enum() *TestRun_Status {
|
||||
p := new(TestRun_Status)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x TestRun_Status) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (TestRun_Status) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_test_run_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (TestRun_Status) Type() protoreflect.EnumType {
|
||||
return &file_test_run_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x TestRun_Status) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TestRun_Status.Descriptor instead.
|
||||
func (TestRun_Status) EnumDescriptor() ([]byte, []int) {
|
||||
return file_test_run_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
type TestRun struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Status TestRun_Status `protobuf:"varint,2,opt,name=status,proto3,enum=legacytypes.helmv2api.TestRun_Status" json:"status,omitempty"`
|
||||
Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"`
|
||||
StartedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
|
||||
CompletedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TestRun) Reset() {
|
||||
*x = TestRun{}
|
||||
mi := &file_test_run_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TestRun) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TestRun) ProtoMessage() {}
|
||||
|
||||
func (x *TestRun) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_test_run_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TestRun.ProtoReflect.Descriptor instead.
|
||||
func (*TestRun) Descriptor() ([]byte, []int) {
|
||||
return file_test_run_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *TestRun) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TestRun) GetStatus() TestRun_Status {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return TestRun_UNKNOWN
|
||||
}
|
||||
|
||||
func (x *TestRun) GetInfo() string {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TestRun) GetStartedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.StartedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TestRun) GetCompletedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CompletedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_test_run_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_test_run_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0etest_run.proto\x12\x15legacytypes.helmv2api\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa8\x02\n" +
|
||||
"\aTestRun\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12=\n" +
|
||||
"\x06status\x18\x02 \x01(\x0e2%.legacytypes.helmv2api.TestRun.StatusR\x06status\x12\x12\n" +
|
||||
"\x04info\x18\x03 \x01(\tR\x04info\x129\n" +
|
||||
"\n" +
|
||||
"started_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x12=\n" +
|
||||
"\fcompleted_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\vcompletedAt\"<\n" +
|
||||
"\x06Status\x12\v\n" +
|
||||
"\aUNKNOWN\x10\x00\x12\v\n" +
|
||||
"\aSUCCESS\x10\x01\x12\v\n" +
|
||||
"\aFAILURE\x10\x02\x12\v\n" +
|
||||
"\aRUNNING\x10\x03BRZPgithub.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2apib\x06proto3"
|
||||
|
||||
var (
|
||||
file_test_run_proto_rawDescOnce sync.Once
|
||||
file_test_run_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_test_run_proto_rawDescGZIP() []byte {
|
||||
file_test_run_proto_rawDescOnce.Do(func() {
|
||||
file_test_run_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_test_run_proto_rawDesc), len(file_test_run_proto_rawDesc)))
|
||||
})
|
||||
return file_test_run_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_test_run_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_test_run_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_test_run_proto_goTypes = []any{
|
||||
(TestRun_Status)(0), // 0: legacytypes.helmv2api.TestRun.Status
|
||||
(*TestRun)(nil), // 1: legacytypes.helmv2api.TestRun
|
||||
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
|
||||
}
|
||||
var file_test_run_proto_depIdxs = []int32{
|
||||
0, // 0: legacytypes.helmv2api.TestRun.status:type_name -> legacytypes.helmv2api.TestRun.Status
|
||||
2, // 1: legacytypes.helmv2api.TestRun.started_at:type_name -> google.protobuf.Timestamp
|
||||
2, // 2: legacytypes.helmv2api.TestRun.completed_at:type_name -> google.protobuf.Timestamp
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_test_run_proto_init() }
|
||||
func file_test_run_proto_init() {
|
||||
if File_test_run_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_test_run_proto_rawDesc), len(file_test_run_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_test_run_proto_goTypes,
|
||||
DependencyIndexes: file_test_run_proto_depIdxs,
|
||||
EnumInfos: file_test_run_proto_enumTypes,
|
||||
MessageInfos: file_test_run_proto_msgTypes,
|
||||
}.Build()
|
||||
File_test_run_proto = out.File
|
||||
file_test_run_proto_goTypes = nil
|
||||
file_test_run_proto_depIdxs = nil
|
||||
}
|
@@ -0,0 +1,37 @@
|
||||
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package legacytypes.helmv2api;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api";
|
||||
|
||||
message TestRun {
|
||||
enum Status {
|
||||
UNKNOWN = 0;
|
||||
SUCCESS = 1;
|
||||
FAILURE = 2;
|
||||
RUNNING = 3;
|
||||
}
|
||||
|
||||
string name = 1;
|
||||
Status status = 2;
|
||||
string info = 3;
|
||||
google.protobuf.Timestamp started_at = 4;
|
||||
google.protobuf.Timestamp completed_at = 5;
|
||||
}
|
@@ -0,0 +1,166 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: test_suite.proto
|
||||
|
||||
package helmv2api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// TestSuite comprises of the last run of the pre-defined test suite of a release version
|
||||
type TestSuite struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// StartedAt indicates the date/time this test suite was kicked off
|
||||
StartedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
|
||||
// CompletedAt indicates the date/time this test suite was completed
|
||||
CompletedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"`
|
||||
// Results are the results of each segment of the test
|
||||
Results []*TestRun `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *TestSuite) Reset() {
|
||||
*x = TestSuite{}
|
||||
mi := &file_test_suite_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TestSuite) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TestSuite) ProtoMessage() {}
|
||||
|
||||
func (x *TestSuite) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_test_suite_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TestSuite.ProtoReflect.Descriptor instead.
|
||||
func (*TestSuite) Descriptor() ([]byte, []int) {
|
||||
return file_test_suite_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *TestSuite) GetStartedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.StartedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TestSuite) GetCompletedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CompletedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TestSuite) GetResults() []*TestRun {
|
||||
if x != nil {
|
||||
return x.Results
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_test_suite_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_test_suite_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x10test_suite.proto\x12\x15legacytypes.helmv2api\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x0etest_run.proto\"\xbf\x01\n" +
|
||||
"\tTestSuite\x129\n" +
|
||||
"\n" +
|
||||
"started_at\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x12=\n" +
|
||||
"\fcompleted_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\vcompletedAt\x128\n" +
|
||||
"\aresults\x18\x03 \x03(\v2\x1e.legacytypes.helmv2api.TestRunR\aresultsBRZPgithub.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2apib\x06proto3"
|
||||
|
||||
var (
|
||||
file_test_suite_proto_rawDescOnce sync.Once
|
||||
file_test_suite_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_test_suite_proto_rawDescGZIP() []byte {
|
||||
file_test_suite_proto_rawDescOnce.Do(func() {
|
||||
file_test_suite_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_test_suite_proto_rawDesc), len(file_test_suite_proto_rawDesc)))
|
||||
})
|
||||
return file_test_suite_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_test_suite_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_test_suite_proto_goTypes = []any{
|
||||
(*TestSuite)(nil), // 0: legacytypes.helmv2api.TestSuite
|
||||
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
||||
(*TestRun)(nil), // 2: legacytypes.helmv2api.TestRun
|
||||
}
|
||||
var file_test_suite_proto_depIdxs = []int32{
|
||||
1, // 0: legacytypes.helmv2api.TestSuite.started_at:type_name -> google.protobuf.Timestamp
|
||||
1, // 1: legacytypes.helmv2api.TestSuite.completed_at:type_name -> google.protobuf.Timestamp
|
||||
2, // 2: legacytypes.helmv2api.TestSuite.results:type_name -> legacytypes.helmv2api.TestRun
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_test_suite_proto_init() }
|
||||
func file_test_suite_proto_init() {
|
||||
if File_test_suite_proto != nil {
|
||||
return
|
||||
}
|
||||
file_test_run_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_test_suite_proto_rawDesc), len(file_test_suite_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_test_suite_proto_goTypes,
|
||||
DependencyIndexes: file_test_suite_proto_depIdxs,
|
||||
MessageInfos: file_test_suite_proto_msgTypes,
|
||||
}.Build()
|
||||
File_test_suite_proto = out.File
|
||||
file_test_suite_proto_goTypes = nil
|
||||
file_test_suite_proto_depIdxs = nil
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
// Copyright The Helm Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package legacytypes.helmv2api;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "test_run.proto";
|
||||
|
||||
option go_package = "github.com/rancher/steve/pkg/resources/formatters/internal/legacytypes/helmv2api";
|
||||
|
||||
// TestSuite comprises of the last run of the pre-defined test suite of a release version
|
||||
message TestSuite {
|
||||
// StartedAt indicates the date/time this test suite was kicked off
|
||||
google.protobuf.Timestamp started_at = 1;
|
||||
|
||||
// CompletedAt indicates the date/time this test suite was completed
|
||||
google.protobuf.Timestamp completed_at = 2;
|
||||
|
||||
// Results are the results of each segment of the test
|
||||
repeated helmv2api.TestRun results = 3;
|
||||
}
|
16
pkg/resources/formatters/testdata/release-cm.yaml
vendored
Normal file
16
pkg/resources/formatters/testdata/release-cm.yaml
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user