From 7a72f10c68d9456df6c63564a50d831982c869f4 Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Tue, 11 May 2021 20:09:34 -0700 Subject: [PATCH 01/11] Make crd rendering conditional --- .../gen/dotnet-templates/helm/ChartBase.cs | 5 +++ .../pkg/gen/dotnet-templates/helm/Unwraps.cs | 39 ++++++++++--------- .../pkg/gen/dotnet-templates/helm/v3/Chart.cs | 4 ++ .../gen/go-templates/helm/v3/pulumiTypes.tmpl | 3 ++ .../pkg/gen/nodejs-templates/helm/v3/helm.ts | 8 ++++ .../pkg/gen/python-templates/helm/v3/helm.py | 25 +++++++++--- provider/pkg/provider/invoke_helm_template.go | 3 +- sdk/dotnet/Helm/ChartBase.cs | 5 +++ sdk/dotnet/Helm/Unwraps.cs | 39 ++++++++++--------- sdk/dotnet/Helm/V3/Chart.cs | 4 ++ sdk/go/kubernetes/helm/v3/pulumiTypes.go | 3 ++ sdk/nodejs/helm/v3/helm.ts | 8 ++++ sdk/python/pulumi_kubernetes/helm/v3/helm.py | 25 +++++++++--- 13 files changed, 124 insertions(+), 47 deletions(-) diff --git a/provider/pkg/gen/dotnet-templates/helm/ChartBase.cs b/provider/pkg/gen/dotnet-templates/helm/ChartBase.cs index ce91df05ee..47880c8e08 100644 --- a/provider/pkg/gen/dotnet-templates/helm/ChartBase.cs +++ b/provider/pkg/gen/dotnet-templates/helm/ChartBase.cs @@ -409,6 +409,11 @@ public InputList ApiVersions /// public Input? IncludeTestHookResources { get; set; } + // + // By default, CRDs are rendered along with Helm chart templates. Setting this to true will skip CRD rendering. + // + public Input? SkipCRDRendering {get; set; } + /// /// The optional namespace to install chart resources into. /// diff --git a/provider/pkg/gen/dotnet-templates/helm/Unwraps.cs b/provider/pkg/gen/dotnet-templates/helm/Unwraps.cs index 8c0f98b628..63c157473c 100644 --- a/provider/pkg/gen/dotnet-templates/helm/Unwraps.cs +++ b/provider/pkg/gen/dotnet-templates/helm/Unwraps.cs @@ -25,6 +25,7 @@ internal class BaseChartArgsUnwrap { public ImmutableArray ApiVersions { get; set; } public bool? IncludeTestHookResources { get; set; } + public bool? SkipCRDRendering { get; set; } public string? Namespace { get; set; } public ImmutableDictionary Values { get; set; } = null!; public List Transformations { get; set; } = null!; @@ -68,29 +69,31 @@ internal static class Extensions public static Output> Unwrap(this Union options) { return options.Match( - v => Output.Tuple(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.Namespace.ToNullable(), v.Values, v.Repo.ToNullable(), v.Chart, v.Version.ToNullable(), v.FetchOptions.Unwrap()).Apply(vs => - Union.FromT0( - new ChartArgsUnwrap - { - ApiVersions = vs.Item1, - IncludeTestHookResources = vs.Item2, - Namespace = vs.Item3, - Values = vs.Item4, - Transformations = v.Transformations, - ResourcePrefix = v.ResourcePrefix, - Repo = vs.Item5, - Chart = vs.Item6, - Version = vs.Item7, - FetchOptions = vs.Item8 - })), - v => Output.Tuple(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.Namespace.ToNullable(), v.Values).Apply(vs => + v => Output.All(ImmutableArray.Create>(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.SkipCRDRendering.ToNullable(), v.Namespace.ToNullable(), v.Values, v.Repo.ToNullable(), v.Chart, v.Version.ToNullable(), v.FetchOptions.Unwrap())).Apply(vs => + Union.FromT0( + new ChartArgsUnwrap + { + ApiVersions = (ImmutableArray)vs[0], + IncludeTestHookResources = (bool)vs[1], + SkipCRDRendering = (bool)vs[2], + Namespace = (string)vs[3], + Values = (ImmutableDictionary)vs[4], + Transformations = v.Transformations, + ResourcePrefix = v.ResourcePrefix, + Repo = (string)vs[5], + Chart = (string)vs[6], + Version = (string)vs[7], + FetchOptions = (ChartFetchArgsUnwrap)vs[8] + })), + v => Output.Tuple(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.SkipCRDRendering.ToNullable(), v.Namespace.ToNullable(), v.Values).Apply(vs => Union.FromT1( new LocalChartArgsUnwrap { ApiVersions = vs.Item1, IncludeTestHookResources = vs.Item2, - Namespace = vs.Item3, - Values = vs.Item4, + SkipCRDRendering = vs.Item3, + Namespace = vs.Item4, + Values = vs.Item5, Transformations = v.Transformations, ResourcePrefix = v.ResourcePrefix, Path = v.Path diff --git a/provider/pkg/gen/dotnet-templates/helm/v3/Chart.cs b/provider/pkg/gen/dotnet-templates/helm/v3/Chart.cs index d2d36e1ecb..13fcba8bad 100644 --- a/provider/pkg/gen/dotnet-templates/helm/v3/Chart.cs +++ b/provider/pkg/gen/dotnet-templates/helm/v3/Chart.cs @@ -310,6 +310,7 @@ private Output> ParseTemplate(Un { ApiVersions = cfgBase.ApiVersions, IncludeTestHookResources = cfgBase.IncludeTestHookResources, + SkipCRDRendering = cfgBase.SkipCRDRendering, Namespace = cfgBase.Namespace, Values = cfgBase.Values, ReleaseName = releaseName, @@ -347,6 +348,7 @@ private Output> ParseTemplate(Un { ApiVersions = cfgBase.ApiVersions, IncludeTestHookResources = cfgBase.IncludeTestHookResources, + SkipCRDRendering = cfgBase.SkipCRDRendering, Namespace = cfgBase.Namespace, Values = cfgBase.Values, ReleaseName = releaseName, @@ -376,6 +378,8 @@ internal class JsonOpts public ImmutableArray ApiVersions { get; set; } [JsonPropertyName("include_test_hook_resources")] public bool? IncludeTestHookResources { get; set; } + [JsonPropertyName("skip_crd_rendering")] + public bool? SkipCRDRendering { get; set; } [JsonPropertyName("namespace")] public string? Namespace { get; set; } [JsonPropertyName("values")] diff --git a/provider/pkg/gen/go-templates/helm/v3/pulumiTypes.tmpl b/provider/pkg/gen/go-templates/helm/v3/pulumiTypes.tmpl index 25ea6b5799..2a11845c7b 100644 --- a/provider/pkg/gen/go-templates/helm/v3/pulumiTypes.tmpl +++ b/provider/pkg/gen/go-templates/helm/v3/pulumiTypes.tmpl @@ -120,6 +120,8 @@ type ChartArgs struct { // By default, Helm resources with the `test`, `test-success`, and `test-failure` hooks are not installed. Set // this flag to true to include these resources. IncludeTestHookResources pulumi.BoolInput + // By default CRDs are also rendered along side templates. Set this to skip CRDs. + SkipCRDRendering pulumi.BoolInput // The optional namespace to install chart resources into. Namespace pulumi.StringInput // Overrides for chart values. @@ -153,6 +155,7 @@ type ChartArgs struct { type chartArgs struct { APIVersions []string `json:"api_versions,omitempty" pulumi:"apiVersions"` IncludeTestHookResources bool `json:"include_test_hook_resources,omitempty" pulumi:"includeTestHookResources"` + SkipCRDRendering bool `json:"skip_crd_rendering,omitempty" pulumi:"skipCRDRendering"` Namespace string `json:"namespace,omitempty" pulumi:"namespace"` Values map[string]interface{} `json:"values,omitempty" pulumi:"values"` Transformations []yaml.Transformation `json:"-" pulumi:"transformations"` diff --git a/provider/pkg/gen/nodejs-templates/helm/v3/helm.ts b/provider/pkg/gen/nodejs-templates/helm/v3/helm.ts index 99fbc2e25e..63489425d3 100644 --- a/provider/pkg/gen/nodejs-templates/helm/v3/helm.ts +++ b/provider/pkg/gen/nodejs-templates/helm/v3/helm.ts @@ -191,6 +191,10 @@ export class Chart extends yaml.CollectionComponentResource { obj["include_test_hook_resources"] = value; break; } + case "skipCRDRendering": { + obj["skip_crd_rendering"] = value; + break; + } case "releaseName": { obj["release_name"] = value; break; @@ -241,6 +245,10 @@ interface BaseChartOpts { * this flag to true to include these resources. */ includeTestHookResources?: boolean; + /** + * By default, CRDs are rendered along with Helm chart templates. Setting this to true will skip CRD rendering. + */ + skipCRDRendering?: boolean; /** * The optional namespace to install chart resources into. */ diff --git a/provider/pkg/gen/python-templates/helm/v3/helm.py b/provider/pkg/gen/python-templates/helm/v3/helm.py index 81ca40664d..411ee0daec 100644 --- a/provider/pkg/gen/python-templates/helm/v3/helm.py +++ b/provider/pkg/gen/python-templates/helm/v3/helm.py @@ -388,13 +388,19 @@ class BaseChartOpts: this flag to true to include these resources. """ + skip_crd_rendering: Optional[pulumi.Input[bool]] + """ + By default, CRDs are rendered along with Helm chart templates. Setting this to true will skip CRD rendering. + """ + def __init__(self, namespace: Optional[pulumi.Input[str]] = None, values: Optional[pulumi.Inputs] = None, transformations: Optional[Sequence[Callable[[Any, pulumi.ResourceOptions], None]]] = None, resource_prefix: Optional[str] = None, api_versions: Optional[Sequence[pulumi.Input[str]]] = None, - include_test_hook_resources: Optional[pulumi.Input[bool]] = None): + include_test_hook_resources: Optional[pulumi.Input[bool]] = None, + skip_crd_rendering: Optional[pulumi.Input[bool]] = None): """ :param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into. :param Optional[pulumi.Inputs] values: Optional overrides for chart values. @@ -408,9 +414,12 @@ def __init__(self, :param Optional[pulumi.Input[bool]] include_test_hook_resources: By default, Helm resources with the 'test', 'test-success', and 'test-failure' hooks are not installed. Set this flag to true to include these resources. + :param Optional[pulumi.Input[bool]] skip_crd_rendering: By default, CRDs are rendered along with Helm chart + templates. Setting this to true will skip CRD rendering. """ self.namespace = namespace self.include_test_hook_resources = include_test_hook_resources + self.skip_crd_rendering = skip_crd_rendering self.values = values self.transformations = transformations self.resource_prefix = resource_prefix @@ -459,7 +468,8 @@ def __init__(self, version: Optional[pulumi.Input[str]] = None, fetch_opts: Optional[pulumi.Input[FetchOpts]] = None, api_versions: Optional[Sequence[pulumi.Input[str]]] = None, - include_test_hook_resources: Optional[pulumi.Input[bool]] = None): + include_test_hook_resources: Optional[pulumi.Input[bool]] = None, + skip_crd_install: Optional[pulumi.Input[bool]] = None): """ :param pulumi.Input[str] chart: The name of the chart to deploy. If `repo` is provided, this chart name will be prefixed by the repo name. @@ -483,9 +493,11 @@ def __init__(self, :param Optional[pulumi.Input[bool]] include_test_hook_resources: By default, Helm resources with the 'test', 'test-success', and 'test-failure' hooks are not installed. Set this flag to true to include these resources. + :param Optional[pulumi.Input[bool]] skip_crd_rendering: By default, CRDs are rendered along with Helm chart + templates. Setting this to true will skip CRD rendering. """ super(ChartOpts, self).__init__(namespace, values, transformations, resource_prefix, api_versions, - include_test_hook_resources) + include_test_hook_resources, skip_crd_install) self.chart = chart self.repo = repo self.version = version @@ -509,7 +521,8 @@ def __init__(self, transformations: Optional[Sequence[Callable[[Any, pulumi.ResourceOptions], None]]] = None, resource_prefix: Optional[str] = None, api_versions: Optional[Sequence[pulumi.Input[str]]] = None, - include_test_hook_resources: Optional[pulumi.Input[bool]] = None): + include_test_hook_resources: Optional[pulumi.Input[bool]] = None, + skip_crd_rendering: Optional[pulumi.Input[bool]] = None): """ :param pulumi.Input[str] path: The path to the chart directory which contains the `Chart.yaml` file. @@ -525,10 +538,12 @@ def __init__(self, :param Optional[pulumi.Input[bool]] include_test_hook_resources: By default, Helm resources with the 'test', 'test-success', and 'test-failure' hooks are not installed. Set this flag to true to include these resources. + :param Optional[pulumi.Input[bool]] skip_crd_rendering: By default, CRDs are rendered along with Helm chart + templates. Setting this to true will skip CRD rendering. """ super(LocalChartOpts, self).__init__(namespace, values, transformations, resource_prefix, api_versions, - include_test_hook_resources) + include_test_hook_resources, skip_crd_rendering) self.path = path diff --git a/provider/pkg/provider/invoke_helm_template.go b/provider/pkg/provider/invoke_helm_template.go index 403ae9fb7e..d017c5a628 100644 --- a/provider/pkg/provider/invoke_helm_template.go +++ b/provider/pkg/provider/invoke_helm_template.go @@ -59,6 +59,7 @@ type HelmChartOpts struct { APIVersions []string `json:"api_versions,omitempty"` Chart string `json:"chart,omitempty"` IncludeTestHookResources bool `json:"include_test_hook_resources,omitempty"` + SkipCRDRendering bool `json:"skip_crd_rendering,omitempty"` Namespace string `json:"namespace,omitempty"` Path string `json:"path,omitempty"` ReleaseName string `json:"release_name,omitempty"` @@ -211,7 +212,7 @@ func (c *chart) template() (string, error) { installAction.APIVersions = c.opts.APIVersions installAction.ClientOnly = true installAction.DryRun = true - installAction.IncludeCRDs = true // TODO: handle this conditionally? + installAction.IncludeCRDs = !c.opts.SkipCRDRendering installAction.Namespace = c.opts.Namespace installAction.NameTemplate = c.opts.ReleaseName installAction.ReleaseName = c.opts.ReleaseName diff --git a/sdk/dotnet/Helm/ChartBase.cs b/sdk/dotnet/Helm/ChartBase.cs index ce91df05ee..47880c8e08 100644 --- a/sdk/dotnet/Helm/ChartBase.cs +++ b/sdk/dotnet/Helm/ChartBase.cs @@ -409,6 +409,11 @@ public InputList ApiVersions /// public Input? IncludeTestHookResources { get; set; } + // + // By default, CRDs are rendered along with Helm chart templates. Setting this to true will skip CRD rendering. + // + public Input? SkipCRDRendering {get; set; } + /// /// The optional namespace to install chart resources into. /// diff --git a/sdk/dotnet/Helm/Unwraps.cs b/sdk/dotnet/Helm/Unwraps.cs index 8c0f98b628..63c157473c 100644 --- a/sdk/dotnet/Helm/Unwraps.cs +++ b/sdk/dotnet/Helm/Unwraps.cs @@ -25,6 +25,7 @@ internal class BaseChartArgsUnwrap { public ImmutableArray ApiVersions { get; set; } public bool? IncludeTestHookResources { get; set; } + public bool? SkipCRDRendering { get; set; } public string? Namespace { get; set; } public ImmutableDictionary Values { get; set; } = null!; public List Transformations { get; set; } = null!; @@ -68,29 +69,31 @@ internal static class Extensions public static Output> Unwrap(this Union options) { return options.Match( - v => Output.Tuple(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.Namespace.ToNullable(), v.Values, v.Repo.ToNullable(), v.Chart, v.Version.ToNullable(), v.FetchOptions.Unwrap()).Apply(vs => - Union.FromT0( - new ChartArgsUnwrap - { - ApiVersions = vs.Item1, - IncludeTestHookResources = vs.Item2, - Namespace = vs.Item3, - Values = vs.Item4, - Transformations = v.Transformations, - ResourcePrefix = v.ResourcePrefix, - Repo = vs.Item5, - Chart = vs.Item6, - Version = vs.Item7, - FetchOptions = vs.Item8 - })), - v => Output.Tuple(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.Namespace.ToNullable(), v.Values).Apply(vs => + v => Output.All(ImmutableArray.Create>(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.SkipCRDRendering.ToNullable(), v.Namespace.ToNullable(), v.Values, v.Repo.ToNullable(), v.Chart, v.Version.ToNullable(), v.FetchOptions.Unwrap())).Apply(vs => + Union.FromT0( + new ChartArgsUnwrap + { + ApiVersions = (ImmutableArray)vs[0], + IncludeTestHookResources = (bool)vs[1], + SkipCRDRendering = (bool)vs[2], + Namespace = (string)vs[3], + Values = (ImmutableDictionary)vs[4], + Transformations = v.Transformations, + ResourcePrefix = v.ResourcePrefix, + Repo = (string)vs[5], + Chart = (string)vs[6], + Version = (string)vs[7], + FetchOptions = (ChartFetchArgsUnwrap)vs[8] + })), + v => Output.Tuple(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.SkipCRDRendering.ToNullable(), v.Namespace.ToNullable(), v.Values).Apply(vs => Union.FromT1( new LocalChartArgsUnwrap { ApiVersions = vs.Item1, IncludeTestHookResources = vs.Item2, - Namespace = vs.Item3, - Values = vs.Item4, + SkipCRDRendering = vs.Item3, + Namespace = vs.Item4, + Values = vs.Item5, Transformations = v.Transformations, ResourcePrefix = v.ResourcePrefix, Path = v.Path diff --git a/sdk/dotnet/Helm/V3/Chart.cs b/sdk/dotnet/Helm/V3/Chart.cs index d2d36e1ecb..13fcba8bad 100644 --- a/sdk/dotnet/Helm/V3/Chart.cs +++ b/sdk/dotnet/Helm/V3/Chart.cs @@ -310,6 +310,7 @@ private Output> ParseTemplate(Un { ApiVersions = cfgBase.ApiVersions, IncludeTestHookResources = cfgBase.IncludeTestHookResources, + SkipCRDRendering = cfgBase.SkipCRDRendering, Namespace = cfgBase.Namespace, Values = cfgBase.Values, ReleaseName = releaseName, @@ -347,6 +348,7 @@ private Output> ParseTemplate(Un { ApiVersions = cfgBase.ApiVersions, IncludeTestHookResources = cfgBase.IncludeTestHookResources, + SkipCRDRendering = cfgBase.SkipCRDRendering, Namespace = cfgBase.Namespace, Values = cfgBase.Values, ReleaseName = releaseName, @@ -376,6 +378,8 @@ internal class JsonOpts public ImmutableArray ApiVersions { get; set; } [JsonPropertyName("include_test_hook_resources")] public bool? IncludeTestHookResources { get; set; } + [JsonPropertyName("skip_crd_rendering")] + public bool? SkipCRDRendering { get; set; } [JsonPropertyName("namespace")] public string? Namespace { get; set; } [JsonPropertyName("values")] diff --git a/sdk/go/kubernetes/helm/v3/pulumiTypes.go b/sdk/go/kubernetes/helm/v3/pulumiTypes.go index 25ea6b5799..2a11845c7b 100644 --- a/sdk/go/kubernetes/helm/v3/pulumiTypes.go +++ b/sdk/go/kubernetes/helm/v3/pulumiTypes.go @@ -120,6 +120,8 @@ type ChartArgs struct { // By default, Helm resources with the `test`, `test-success`, and `test-failure` hooks are not installed. Set // this flag to true to include these resources. IncludeTestHookResources pulumi.BoolInput + // By default CRDs are also rendered along side templates. Set this to skip CRDs. + SkipCRDRendering pulumi.BoolInput // The optional namespace to install chart resources into. Namespace pulumi.StringInput // Overrides for chart values. @@ -153,6 +155,7 @@ type ChartArgs struct { type chartArgs struct { APIVersions []string `json:"api_versions,omitempty" pulumi:"apiVersions"` IncludeTestHookResources bool `json:"include_test_hook_resources,omitempty" pulumi:"includeTestHookResources"` + SkipCRDRendering bool `json:"skip_crd_rendering,omitempty" pulumi:"skipCRDRendering"` Namespace string `json:"namespace,omitempty" pulumi:"namespace"` Values map[string]interface{} `json:"values,omitempty" pulumi:"values"` Transformations []yaml.Transformation `json:"-" pulumi:"transformations"` diff --git a/sdk/nodejs/helm/v3/helm.ts b/sdk/nodejs/helm/v3/helm.ts index 99fbc2e25e..63489425d3 100644 --- a/sdk/nodejs/helm/v3/helm.ts +++ b/sdk/nodejs/helm/v3/helm.ts @@ -191,6 +191,10 @@ export class Chart extends yaml.CollectionComponentResource { obj["include_test_hook_resources"] = value; break; } + case "skipCRDRendering": { + obj["skip_crd_rendering"] = value; + break; + } case "releaseName": { obj["release_name"] = value; break; @@ -241,6 +245,10 @@ interface BaseChartOpts { * this flag to true to include these resources. */ includeTestHookResources?: boolean; + /** + * By default, CRDs are rendered along with Helm chart templates. Setting this to true will skip CRD rendering. + */ + skipCRDRendering?: boolean; /** * The optional namespace to install chart resources into. */ diff --git a/sdk/python/pulumi_kubernetes/helm/v3/helm.py b/sdk/python/pulumi_kubernetes/helm/v3/helm.py index 81ca40664d..411ee0daec 100644 --- a/sdk/python/pulumi_kubernetes/helm/v3/helm.py +++ b/sdk/python/pulumi_kubernetes/helm/v3/helm.py @@ -388,13 +388,19 @@ class BaseChartOpts: this flag to true to include these resources. """ + skip_crd_rendering: Optional[pulumi.Input[bool]] + """ + By default, CRDs are rendered along with Helm chart templates. Setting this to true will skip CRD rendering. + """ + def __init__(self, namespace: Optional[pulumi.Input[str]] = None, values: Optional[pulumi.Inputs] = None, transformations: Optional[Sequence[Callable[[Any, pulumi.ResourceOptions], None]]] = None, resource_prefix: Optional[str] = None, api_versions: Optional[Sequence[pulumi.Input[str]]] = None, - include_test_hook_resources: Optional[pulumi.Input[bool]] = None): + include_test_hook_resources: Optional[pulumi.Input[bool]] = None, + skip_crd_rendering: Optional[pulumi.Input[bool]] = None): """ :param Optional[pulumi.Input[str]] namespace: Optional namespace to install chart resources into. :param Optional[pulumi.Inputs] values: Optional overrides for chart values. @@ -408,9 +414,12 @@ def __init__(self, :param Optional[pulumi.Input[bool]] include_test_hook_resources: By default, Helm resources with the 'test', 'test-success', and 'test-failure' hooks are not installed. Set this flag to true to include these resources. + :param Optional[pulumi.Input[bool]] skip_crd_rendering: By default, CRDs are rendered along with Helm chart + templates. Setting this to true will skip CRD rendering. """ self.namespace = namespace self.include_test_hook_resources = include_test_hook_resources + self.skip_crd_rendering = skip_crd_rendering self.values = values self.transformations = transformations self.resource_prefix = resource_prefix @@ -459,7 +468,8 @@ def __init__(self, version: Optional[pulumi.Input[str]] = None, fetch_opts: Optional[pulumi.Input[FetchOpts]] = None, api_versions: Optional[Sequence[pulumi.Input[str]]] = None, - include_test_hook_resources: Optional[pulumi.Input[bool]] = None): + include_test_hook_resources: Optional[pulumi.Input[bool]] = None, + skip_crd_install: Optional[pulumi.Input[bool]] = None): """ :param pulumi.Input[str] chart: The name of the chart to deploy. If `repo` is provided, this chart name will be prefixed by the repo name. @@ -483,9 +493,11 @@ def __init__(self, :param Optional[pulumi.Input[bool]] include_test_hook_resources: By default, Helm resources with the 'test', 'test-success', and 'test-failure' hooks are not installed. Set this flag to true to include these resources. + :param Optional[pulumi.Input[bool]] skip_crd_rendering: By default, CRDs are rendered along with Helm chart + templates. Setting this to true will skip CRD rendering. """ super(ChartOpts, self).__init__(namespace, values, transformations, resource_prefix, api_versions, - include_test_hook_resources) + include_test_hook_resources, skip_crd_install) self.chart = chart self.repo = repo self.version = version @@ -509,7 +521,8 @@ def __init__(self, transformations: Optional[Sequence[Callable[[Any, pulumi.ResourceOptions], None]]] = None, resource_prefix: Optional[str] = None, api_versions: Optional[Sequence[pulumi.Input[str]]] = None, - include_test_hook_resources: Optional[pulumi.Input[bool]] = None): + include_test_hook_resources: Optional[pulumi.Input[bool]] = None, + skip_crd_rendering: Optional[pulumi.Input[bool]] = None): """ :param pulumi.Input[str] path: The path to the chart directory which contains the `Chart.yaml` file. @@ -525,10 +538,12 @@ def __init__(self, :param Optional[pulumi.Input[bool]] include_test_hook_resources: By default, Helm resources with the 'test', 'test-success', and 'test-failure' hooks are not installed. Set this flag to true to include these resources. + :param Optional[pulumi.Input[bool]] skip_crd_rendering: By default, CRDs are rendered along with Helm chart + templates. Setting this to true will skip CRD rendering. """ super(LocalChartOpts, self).__init__(namespace, values, transformations, resource_prefix, api_versions, - include_test_hook_resources) + include_test_hook_resources, skip_crd_rendering) self.path = path From 2867d414ce625a3e0a1eb0434ae03c34ad9e3d16 Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Tue, 11 May 2021 20:10:20 -0700 Subject: [PATCH 02/11] Dotnet test --- tests/sdk/dotnet/dotnet_test.go | 13 + .../step1/HelmSkipCRDRendering.csproj | 12 + .../helm-skip-crd-rendering/step1/Program.cs | 48 ++ .../helm-skip-crd-rendering/step1/Pulumi.yaml | 3 + .../helm-allow-crd-rendering/.helmignore | 21 + .../step1/helm-allow-crd-rendering/Chart.yaml | 4 + .../helm-allow-crd-rendering/crds/crd-10.yaml | 573 ++++++++++++++++++ .../templates/test-pod.yaml | 9 + .../helm-allow-crd-rendering/values.yaml | 0 .../step1/helm-skip-crd-rendering/.helmignore | 21 + .../step1/helm-skip-crd-rendering/Chart.yaml | 4 + .../helm-skip-crd-rendering/crds/crd-10.yaml | 573 ++++++++++++++++++ .../templates/test-pod.yaml | 9 + .../step1/helm-skip-crd-rendering/values.yaml | 0 14 files changed, 1290 insertions(+) create mode 100644 tests/sdk/dotnet/helm-skip-crd-rendering/step1/HelmSkipCRDRendering.csproj create mode 100644 tests/sdk/dotnet/helm-skip-crd-rendering/step1/Program.cs create mode 100644 tests/sdk/dotnet/helm-skip-crd-rendering/step1/Pulumi.yaml create mode 100755 tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore create mode 100755 tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml create mode 100755 tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml create mode 100755 tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml create mode 100755 tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml create mode 100755 tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore create mode 100755 tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml create mode 100755 tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml create mode 100755 tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml create mode 100755 tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml diff --git a/tests/sdk/dotnet/dotnet_test.go b/tests/sdk/dotnet/dotnet_test.go index 17181dd096..4459745716 100644 --- a/tests/sdk/dotnet/dotnet_test.go +++ b/tests/sdk/dotnet/dotnet_test.go @@ -143,6 +143,19 @@ func TestDotnet_HelmApiVersions(t *testing.T) { integration.ProgramTest(t, &test) } +func TestDotnet_HelmAllowCRDRendering(t *testing.T) { + test := baseOptions.With(integration.ProgramTestOptions{ + Dir: filepath.Join("helm-skip-crd-rendering", "step1"), + Quick: true, + SkipRefresh: true, // Istio custom resources may exhibit refresh changes. + ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { + assert.NotNil(t, stackInfo.Deployment) + assert.Equal(t, 28, len(stackInfo.Deployment.Resources)) + }, + }) + integration.ProgramTest(t, &test) +} + func TestDotnet_CustomResource(t *testing.T) { test := baseOptions.With(integration.ProgramTestOptions{ Dir: "custom-resource", diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/HelmSkipCRDRendering.csproj b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/HelmSkipCRDRendering.csproj new file mode 100644 index 0000000000..6dc380ba6e --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/HelmSkipCRDRendering.csproj @@ -0,0 +1,12 @@ + + + + Exe + netcoreapp3.1 + + + + + diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/Program.cs b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/Program.cs new file mode 100644 index 0000000000..b94b06d9e4 --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/Program.cs @@ -0,0 +1,48 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi; +using Pulumi.Kubernetes.Core.V1; +using Pulumi.Kubernetes.Helm; +using Pulumi.Kubernetes.Helm.V3; +using Pulumi.Kubernetes.Types.Inputs.Core.V1; +using Pulumi.Kubernetes.Yaml; +using Pulumi.Serialization; + +class HelmStack : Stack +{ + public HelmStack() + { + var namespaceTest = new Namespace("test"); + var namespaceName = namespaceTest.Metadata.Apply(n => n.Name); + + new Chart("skip-crd-rendering", new LocalChartArgs + { + Namespace = namespaceName, + SkipCRDRendering = true, + Path = "helm-skip-crd-rendering" + }); + + new Chart("allow-crd-rendering", new LocalChartArgs + { + Namespace = namespaceName, + SkipCRDRendering = false, + Path = "helm-allow-crd-rendering" + }); + + // If we enabled CRDRendering on both charts, we would expect collisions on the identical + // URNs for the installed CRDs. + // kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinition virtualservices.networking.istio.io error: Duplicate resource URN + // 'urn:pulumi:....:helm.sh/v3:Chart$kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinition::virtualservices.networking.istio.io'; + // try giving it a unique name + // See https://github.com/pulumi/pulumi-kubernetes/issues/1225 + } +} + +class Program +{ + static Task Main(string[] args) => Deployment.RunAsync(); +} diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/Pulumi.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/Pulumi.yaml new file mode 100644 index 0000000000..6094300cda --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: dotnet-helm-skip-crd-rendering +description: Deploys a simple Helm chart with skipping crd rendering option set +runtime: dotnet diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml new file mode 100755 index 0000000000..6b443eb9d7 --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml @@ -0,0 +1,4 @@ +deprecated: true +description: Chart to test the default behavior of allowing crd rendering +name: allow-rendering-test +version: 0.0.1 diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml new file mode 100755 index 0000000000..05162d6a95 --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -0,0 +1,573 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: virtualservices.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: VirtualService + listKind: VirtualServiceList + plural: virtualservices + singular: virtualservice + shortNames: + - vs + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.gateways + description: The names of gateways and sidecars that should apply these routes + name: Gateways + type: string + - JSONPath: .spec.hosts + description: The destination hosts to which traffic is being sent + name: Hosts + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: destinationrules.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: DestinationRule + listKind: DestinationRuleList + plural: destinationrules + singular: destinationrule + shortNames: + - dr + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.host + description: The name of a service from the service registry + name: Host + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: serviceentries.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: ServiceEntry + listKind: ServiceEntryList + plural: serviceentries + singular: serviceentry + shortNames: + - se + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.hosts + description: The hosts associated with the ServiceEntry + name: Hosts + type: string + - JSONPath: .spec.location + description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + name: Location + type: string + - JSONPath: .spec.resolution + description: Service discovery mode for the hosts (NONE, STATIC, or DNS) + name: Resolution + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: gateways.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: Gateway + plural: gateways + singular: gateway + shortNames: + - gw + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: envoyfilters.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: EnvoyFilter + plural: envoyfilters + singular: envoyfilter + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: clusterrbacconfigs.rbac.istio.io + labels: + app: istio-pilot + istio: rbac + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ClusterRbacConfig + plural: clusterrbacconfigs + singular: clusterrbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: policies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: Policy + plural: policies + singular: policy + categories: + - istio-io + - authentication-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: meshpolicies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: MeshPolicy + listKind: MeshPolicyList + plural: meshpolicies + singular: meshpolicy + categories: + - istio-io + - authentication-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpecBinding + plural: httpapispecbindings + singular: httpapispecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpec + plural: httpapispecs + singular: httpapispec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpecBinding + plural: quotaspecbindings + singular: quotaspecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpec + plural: quotaspecs + singular: quotaspec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rules.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: rule + plural: rules + singular: rule + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: attributemanifests.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: attributemanifest + plural: attributemanifests + singular: attributemanifest + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rbacconfigs.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: RbacConfig + plural: rbacconfigs + singular: rbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: serviceroles.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRole + plural: serviceroles + singular: servicerole + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: servicerolebindings.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRoleBinding + plural: servicerolebindings + singular: servicerolebinding + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 + additionalPrinterColumns: + - JSONPath: .spec.roleRef.name + description: The name of the ServiceRole object being referenced + name: Reference + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: adapters.config.istio.io + labels: + app: mixer + package: adapter + istio: mixer-adapter + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: adapter + plural: adapters + singular: adapter + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: instances.config.istio.io + labels: + app: mixer + package: instance + istio: mixer-instance + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: instance + plural: instances + singular: instance + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: templates.config.istio.io + labels: + app: mixer + package: template + istio: mixer-template + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: template + plural: templates + singular: template + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: handlers.config.istio.io + labels: + app: mixer + package: handler + istio: mixer-handler + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: handler + plural: handlers + singular: handler + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml new file mode 100755 index 0000000000..2abf66ea4e --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Pod +metadata: + name: helm-allow-crd-rendering-test + namespace: {{ .Release.Namespace }} +spec: + containers: + - name: helm-allow-crd-rendering-test + image: nginx diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml new file mode 100755 index 0000000000..e69de29bb2 diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml new file mode 100755 index 0000000000..a8ce643cc9 --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml @@ -0,0 +1,4 @@ +deprecated: true +description: Chart to test skipping crd rendering +name: skip-rendering-test +version: 0.0.1 diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml new file mode 100755 index 0000000000..05162d6a95 --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -0,0 +1,573 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: virtualservices.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: VirtualService + listKind: VirtualServiceList + plural: virtualservices + singular: virtualservice + shortNames: + - vs + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.gateways + description: The names of gateways and sidecars that should apply these routes + name: Gateways + type: string + - JSONPath: .spec.hosts + description: The destination hosts to which traffic is being sent + name: Hosts + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: destinationrules.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: DestinationRule + listKind: DestinationRuleList + plural: destinationrules + singular: destinationrule + shortNames: + - dr + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.host + description: The name of a service from the service registry + name: Host + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: serviceentries.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: ServiceEntry + listKind: ServiceEntryList + plural: serviceentries + singular: serviceentry + shortNames: + - se + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.hosts + description: The hosts associated with the ServiceEntry + name: Hosts + type: string + - JSONPath: .spec.location + description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + name: Location + type: string + - JSONPath: .spec.resolution + description: Service discovery mode for the hosts (NONE, STATIC, or DNS) + name: Resolution + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: gateways.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: Gateway + plural: gateways + singular: gateway + shortNames: + - gw + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: envoyfilters.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: EnvoyFilter + plural: envoyfilters + singular: envoyfilter + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: clusterrbacconfigs.rbac.istio.io + labels: + app: istio-pilot + istio: rbac + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ClusterRbacConfig + plural: clusterrbacconfigs + singular: clusterrbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: policies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: Policy + plural: policies + singular: policy + categories: + - istio-io + - authentication-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: meshpolicies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: MeshPolicy + listKind: MeshPolicyList + plural: meshpolicies + singular: meshpolicy + categories: + - istio-io + - authentication-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpecBinding + plural: httpapispecbindings + singular: httpapispecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpec + plural: httpapispecs + singular: httpapispec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpecBinding + plural: quotaspecbindings + singular: quotaspecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpec + plural: quotaspecs + singular: quotaspec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rules.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: rule + plural: rules + singular: rule + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: attributemanifests.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: attributemanifest + plural: attributemanifests + singular: attributemanifest + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rbacconfigs.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: RbacConfig + plural: rbacconfigs + singular: rbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: serviceroles.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRole + plural: serviceroles + singular: servicerole + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: servicerolebindings.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRoleBinding + plural: servicerolebindings + singular: servicerolebinding + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 + additionalPrinterColumns: + - JSONPath: .spec.roleRef.name + description: The name of the ServiceRole object being referenced + name: Reference + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: adapters.config.istio.io + labels: + app: mixer + package: adapter + istio: mixer-adapter + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: adapter + plural: adapters + singular: adapter + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: instances.config.istio.io + labels: + app: mixer + package: instance + istio: mixer-instance + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: instance + plural: instances + singular: instance + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: templates.config.istio.io + labels: + app: mixer + package: template + istio: mixer-template + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: template + plural: templates + singular: template + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: handlers.config.istio.io + labels: + app: mixer + package: handler + istio: mixer-handler + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: handler + plural: handlers + singular: handler + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml new file mode 100755 index 0000000000..7be4321a5f --- /dev/null +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Pod +metadata: + name: helm-skip-crd-rendering-test + namespace: {{ .Release.Namespace }} +spec: + containers: + - name: helm-skip-crd-rendering-test + image: nginx diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml new file mode 100755 index 0000000000..e69de29bb2 From 389af89182e029b63ecf7e33583807d936e49be0 Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Tue, 11 May 2021 22:30:40 -0700 Subject: [PATCH 03/11] Go test --- tests/sdk/go/go_test.go | 15 +- .../helm-skip-crd-rendering/step1/Pulumi.yaml | 3 + .../helm-allow-crd-rendering/.helmignore | 21 + .../step1/helm-allow-crd-rendering/Chart.yaml | 4 + .../helm-allow-crd-rendering/crds/crd-10.yaml | 573 ++++++++++++++++++ .../templates/test-pod.yaml | 9 + .../helm-allow-crd-rendering/values.yaml | 0 .../step1/helm-skip-crd-rendering/.helmignore | 21 + .../step1/helm-skip-crd-rendering/Chart.yaml | 4 + .../helm-skip-crd-rendering/crds/crd-10.yaml | 573 ++++++++++++++++++ .../templates/test-pod.yaml | 9 + .../step1/helm-skip-crd-rendering/values.yaml | 0 .../go/helm-skip-crd-rendering/step1/main.go | 36 ++ 13 files changed, 1267 insertions(+), 1 deletion(-) create mode 100644 tests/sdk/go/helm-skip-crd-rendering/step1/Pulumi.yaml create mode 100755 tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore create mode 100755 tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml create mode 100755 tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml create mode 100755 tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml create mode 100755 tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml create mode 100755 tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore create mode 100755 tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml create mode 100755 tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml create mode 100755 tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml create mode 100755 tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml create mode 100644 tests/sdk/go/helm-skip-crd-rendering/step1/main.go diff --git a/tests/sdk/go/go_test.go b/tests/sdk/go/go_test.go index 61f6174b96..cf2588f65b 100644 --- a/tests/sdk/go/go_test.go +++ b/tests/sdk/go/go_test.go @@ -26,7 +26,7 @@ import ( var baseOptions = &integration.ProgramTestOptions{ Verbose: true, Dependencies: []string{ - "github.com/pulumi/pulumi-kubernetes/sdk/v3/go", + "github.com/pulumi/pulumi-kubernetes/sdk/v3", }, } @@ -99,6 +99,19 @@ func TestGo(t *testing.T) { integration.ProgramTest(t, &options) }) + t.Run("Helm Skip CRD Rendering", func(t *testing.T) { + options := baseOptions.With(integration.ProgramTestOptions{ + Dir: filepath.Join("helm-skip-crd-rendering", "step1"), + Quick: true, + SkipRefresh: true, // Istio custom resources may exhibit refresh changes. + ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { + assert.NotNil(t, stackInfo.Deployment) + assert.Equal(t, 28, len(stackInfo.Deployment.Resources)) + }, + }) + integration.ProgramTest(t, &options) + }) + t.Run("Kustomize", func(t *testing.T) { options := baseOptions.With(integration.ProgramTestOptions{ Dir: filepath.Join(cwd, "kustomize"), diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/Pulumi.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/Pulumi.yaml new file mode 100644 index 0000000000..484503c0e0 --- /dev/null +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: dotnet-helm-skip-crd-rendering +description: Deploys a simple Helm chart with skipping crd rendering option set +runtime: go diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml new file mode 100755 index 0000000000..6b443eb9d7 --- /dev/null +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml @@ -0,0 +1,4 @@ +deprecated: true +description: Chart to test the default behavior of allowing crd rendering +name: allow-rendering-test +version: 0.0.1 diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml new file mode 100755 index 0000000000..05162d6a95 --- /dev/null +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -0,0 +1,573 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: virtualservices.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: VirtualService + listKind: VirtualServiceList + plural: virtualservices + singular: virtualservice + shortNames: + - vs + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.gateways + description: The names of gateways and sidecars that should apply these routes + name: Gateways + type: string + - JSONPath: .spec.hosts + description: The destination hosts to which traffic is being sent + name: Hosts + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: destinationrules.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: DestinationRule + listKind: DestinationRuleList + plural: destinationrules + singular: destinationrule + shortNames: + - dr + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.host + description: The name of a service from the service registry + name: Host + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: serviceentries.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: ServiceEntry + listKind: ServiceEntryList + plural: serviceentries + singular: serviceentry + shortNames: + - se + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.hosts + description: The hosts associated with the ServiceEntry + name: Hosts + type: string + - JSONPath: .spec.location + description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + name: Location + type: string + - JSONPath: .spec.resolution + description: Service discovery mode for the hosts (NONE, STATIC, or DNS) + name: Resolution + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: gateways.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: Gateway + plural: gateways + singular: gateway + shortNames: + - gw + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: envoyfilters.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: EnvoyFilter + plural: envoyfilters + singular: envoyfilter + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: clusterrbacconfigs.rbac.istio.io + labels: + app: istio-pilot + istio: rbac + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ClusterRbacConfig + plural: clusterrbacconfigs + singular: clusterrbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: policies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: Policy + plural: policies + singular: policy + categories: + - istio-io + - authentication-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: meshpolicies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: MeshPolicy + listKind: MeshPolicyList + plural: meshpolicies + singular: meshpolicy + categories: + - istio-io + - authentication-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpecBinding + plural: httpapispecbindings + singular: httpapispecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpec + plural: httpapispecs + singular: httpapispec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpecBinding + plural: quotaspecbindings + singular: quotaspecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpec + plural: quotaspecs + singular: quotaspec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rules.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: rule + plural: rules + singular: rule + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: attributemanifests.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: attributemanifest + plural: attributemanifests + singular: attributemanifest + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rbacconfigs.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: RbacConfig + plural: rbacconfigs + singular: rbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: serviceroles.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRole + plural: serviceroles + singular: servicerole + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: servicerolebindings.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRoleBinding + plural: servicerolebindings + singular: servicerolebinding + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 + additionalPrinterColumns: + - JSONPath: .spec.roleRef.name + description: The name of the ServiceRole object being referenced + name: Reference + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: adapters.config.istio.io + labels: + app: mixer + package: adapter + istio: mixer-adapter + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: adapter + plural: adapters + singular: adapter + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: instances.config.istio.io + labels: + app: mixer + package: instance + istio: mixer-instance + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: instance + plural: instances + singular: instance + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: templates.config.istio.io + labels: + app: mixer + package: template + istio: mixer-template + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: template + plural: templates + singular: template + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: handlers.config.istio.io + labels: + app: mixer + package: handler + istio: mixer-handler + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: handler + plural: handlers + singular: handler + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml new file mode 100755 index 0000000000..2abf66ea4e --- /dev/null +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Pod +metadata: + name: helm-allow-crd-rendering-test + namespace: {{ .Release.Namespace }} +spec: + containers: + - name: helm-allow-crd-rendering-test + image: nginx diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml new file mode 100755 index 0000000000..e69de29bb2 diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml new file mode 100755 index 0000000000..a8ce643cc9 --- /dev/null +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml @@ -0,0 +1,4 @@ +deprecated: true +description: Chart to test skipping crd rendering +name: skip-rendering-test +version: 0.0.1 diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml new file mode 100755 index 0000000000..05162d6a95 --- /dev/null +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -0,0 +1,573 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: virtualservices.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: VirtualService + listKind: VirtualServiceList + plural: virtualservices + singular: virtualservice + shortNames: + - vs + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.gateways + description: The names of gateways and sidecars that should apply these routes + name: Gateways + type: string + - JSONPath: .spec.hosts + description: The destination hosts to which traffic is being sent + name: Hosts + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: destinationrules.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: DestinationRule + listKind: DestinationRuleList + plural: destinationrules + singular: destinationrule + shortNames: + - dr + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.host + description: The name of a service from the service registry + name: Host + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: serviceentries.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: ServiceEntry + listKind: ServiceEntryList + plural: serviceentries + singular: serviceentry + shortNames: + - se + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.hosts + description: The hosts associated with the ServiceEntry + name: Hosts + type: string + - JSONPath: .spec.location + description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + name: Location + type: string + - JSONPath: .spec.resolution + description: Service discovery mode for the hosts (NONE, STATIC, or DNS) + name: Resolution + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: gateways.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: Gateway + plural: gateways + singular: gateway + shortNames: + - gw + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: envoyfilters.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: EnvoyFilter + plural: envoyfilters + singular: envoyfilter + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: clusterrbacconfigs.rbac.istio.io + labels: + app: istio-pilot + istio: rbac + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ClusterRbacConfig + plural: clusterrbacconfigs + singular: clusterrbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: policies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: Policy + plural: policies + singular: policy + categories: + - istio-io + - authentication-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: meshpolicies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: MeshPolicy + listKind: MeshPolicyList + plural: meshpolicies + singular: meshpolicy + categories: + - istio-io + - authentication-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpecBinding + plural: httpapispecbindings + singular: httpapispecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpec + plural: httpapispecs + singular: httpapispec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpecBinding + plural: quotaspecbindings + singular: quotaspecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpec + plural: quotaspecs + singular: quotaspec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rules.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: rule + plural: rules + singular: rule + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: attributemanifests.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: attributemanifest + plural: attributemanifests + singular: attributemanifest + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rbacconfigs.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: RbacConfig + plural: rbacconfigs + singular: rbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: serviceroles.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRole + plural: serviceroles + singular: servicerole + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: servicerolebindings.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRoleBinding + plural: servicerolebindings + singular: servicerolebinding + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 + additionalPrinterColumns: + - JSONPath: .spec.roleRef.name + description: The name of the ServiceRole object being referenced + name: Reference + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: adapters.config.istio.io + labels: + app: mixer + package: adapter + istio: mixer-adapter + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: adapter + plural: adapters + singular: adapter + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: instances.config.istio.io + labels: + app: mixer + package: instance + istio: mixer-instance + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: instance + plural: instances + singular: instance + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: templates.config.istio.io + labels: + app: mixer + package: template + istio: mixer-template + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: template + plural: templates + singular: template + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: handlers.config.istio.io + labels: + app: mixer + package: handler + istio: mixer-handler + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: handler + plural: handlers + singular: handler + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml new file mode 100755 index 0000000000..7be4321a5f --- /dev/null +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Pod +metadata: + name: helm-skip-crd-rendering-test + namespace: {{ .Release.Namespace }} +spec: + containers: + - name: helm-skip-crd-rendering-test + image: nginx diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml new file mode 100755 index 0000000000..e69de29bb2 diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/main.go b/tests/sdk/go/helm-skip-crd-rendering/step1/main.go new file mode 100644 index 0000000000..93dfbf641f --- /dev/null +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/main.go @@ -0,0 +1,36 @@ +package main + +import ( + corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/core/v1" + "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/helm/v3" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + namespace, err := corev1.NewNamespace(ctx, "test", nil) + if err != nil { + return err + } + + _, err = helm.NewChart(ctx, "skip-crd-rendering", helm.ChartArgs{ + SkipCRDRendering: pulumi.Bool(true), + Namespace: namespace.Metadata.Name().Elem(), + Path: pulumi.String("helm-skip-crd-rendering"), + }) + if err != nil { + return err + } + + _, err = helm.NewChart(ctx, "allow-crd-rendering", helm.ChartArgs{ + SkipCRDRendering: pulumi.Bool(false), + Namespace: namespace.Metadata.Name().Elem(), + Path: pulumi.String("helm-allow-crd-rendering"), + }) + if err != nil { + return err + } + + return nil + }) +} From 1436133ded52d3d1000bd8ecc644a5d0fdfdc40a Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Tue, 11 May 2021 22:59:05 -0700 Subject: [PATCH 04/11] Nodejs tests --- tests/sdk/nodejs/examples/examples_test.go | 14 + .../helm-skip-crd-rendering/step1/.gitignore | 3 + .../helm-skip-crd-rendering/step1/Pulumi.yaml | 3 + .../helm-allow-crd-rendering/.helmignore | 21 + .../step1/helm-allow-crd-rendering/Chart.yaml | 4 + .../helm-allow-crd-rendering/crds/crd-10.yaml | 573 ++++++++++++++++++ .../templates/test-pod.yaml | 9 + .../helm-allow-crd-rendering/values.yaml | 0 .../step1/helm-skip-crd-rendering/.helmignore | 21 + .../step1/helm-skip-crd-rendering/Chart.yaml | 4 + .../helm-skip-crd-rendering/crds/crd-10.yaml | 573 ++++++++++++++++++ .../templates/test-pod.yaml | 9 + .../step1/helm-skip-crd-rendering/values.yaml | 0 .../helm-skip-crd-rendering/step1/index.ts | 15 + .../step1/package.json | 14 + .../step1/tsconfig.json | 21 + 16 files changed, 1284 insertions(+) create mode 100644 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/.gitignore create mode 100644 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/Pulumi.yaml create mode 100755 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore create mode 100755 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml create mode 100755 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml create mode 100755 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml create mode 100755 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml create mode 100755 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore create mode 100755 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml create mode 100755 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml create mode 100755 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml create mode 100755 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml create mode 100644 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/index.ts create mode 100644 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/package.json create mode 100644 tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/tsconfig.json diff --git a/tests/sdk/nodejs/examples/examples_test.go b/tests/sdk/nodejs/examples/examples_test.go index baff09e859..0d9ceaeab7 100644 --- a/tests/sdk/nodejs/examples/examples_test.go +++ b/tests/sdk/nodejs/examples/examples_test.go @@ -186,6 +186,20 @@ func TestAccHelmApiVersions(t *testing.T) { integration.ProgramTest(t, &test) } +func TestAccHelmAllowCRDRendering(t *testing.T) { + test := getBaseOptions(t). + With(integration.ProgramTestOptions{ + Dir: filepath.Join("helm-skip-crd-rendering", "step1"), + Quick: true, + SkipRefresh: true, + ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { + assert.NotNil(t, stackInfo.Deployment) + assert.Equal(t, 28, len(stackInfo.Deployment.Resources)) + }, + }) + integration.ProgramTest(t, &test) +} + func TestAccHelmLocal(t *testing.T) { skipIfShort(t) test := getBaseOptions(t). diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/.gitignore b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/.gitignore new file mode 100644 index 0000000000..02453dd3ca --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/.gitignore @@ -0,0 +1,3 @@ +/bin/ +/node_modules/ +/stable/ diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/Pulumi.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/Pulumi.yaml new file mode 100644 index 0000000000..a8bcc8d736 --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: dotnet-helm-skip-crd-rendering +description: Deploys a simple Helm chart with skipping crd rendering option set +runtime: nodejs diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml new file mode 100755 index 0000000000..6b443eb9d7 --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml @@ -0,0 +1,4 @@ +deprecated: true +description: Chart to test the default behavior of allowing crd rendering +name: allow-rendering-test +version: 0.0.1 diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml new file mode 100755 index 0000000000..05162d6a95 --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -0,0 +1,573 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: virtualservices.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: VirtualService + listKind: VirtualServiceList + plural: virtualservices + singular: virtualservice + shortNames: + - vs + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.gateways + description: The names of gateways and sidecars that should apply these routes + name: Gateways + type: string + - JSONPath: .spec.hosts + description: The destination hosts to which traffic is being sent + name: Hosts + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: destinationrules.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: DestinationRule + listKind: DestinationRuleList + plural: destinationrules + singular: destinationrule + shortNames: + - dr + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.host + description: The name of a service from the service registry + name: Host + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: serviceentries.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: ServiceEntry + listKind: ServiceEntryList + plural: serviceentries + singular: serviceentry + shortNames: + - se + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.hosts + description: The hosts associated with the ServiceEntry + name: Hosts + type: string + - JSONPath: .spec.location + description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + name: Location + type: string + - JSONPath: .spec.resolution + description: Service discovery mode for the hosts (NONE, STATIC, or DNS) + name: Resolution + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: gateways.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: Gateway + plural: gateways + singular: gateway + shortNames: + - gw + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: envoyfilters.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: EnvoyFilter + plural: envoyfilters + singular: envoyfilter + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: clusterrbacconfigs.rbac.istio.io + labels: + app: istio-pilot + istio: rbac + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ClusterRbacConfig + plural: clusterrbacconfigs + singular: clusterrbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: policies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: Policy + plural: policies + singular: policy + categories: + - istio-io + - authentication-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: meshpolicies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: MeshPolicy + listKind: MeshPolicyList + plural: meshpolicies + singular: meshpolicy + categories: + - istio-io + - authentication-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpecBinding + plural: httpapispecbindings + singular: httpapispecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpec + plural: httpapispecs + singular: httpapispec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpecBinding + plural: quotaspecbindings + singular: quotaspecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpec + plural: quotaspecs + singular: quotaspec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rules.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: rule + plural: rules + singular: rule + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: attributemanifests.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: attributemanifest + plural: attributemanifests + singular: attributemanifest + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rbacconfigs.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: RbacConfig + plural: rbacconfigs + singular: rbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: serviceroles.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRole + plural: serviceroles + singular: servicerole + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: servicerolebindings.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRoleBinding + plural: servicerolebindings + singular: servicerolebinding + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 + additionalPrinterColumns: + - JSONPath: .spec.roleRef.name + description: The name of the ServiceRole object being referenced + name: Reference + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: adapters.config.istio.io + labels: + app: mixer + package: adapter + istio: mixer-adapter + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: adapter + plural: adapters + singular: adapter + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: instances.config.istio.io + labels: + app: mixer + package: instance + istio: mixer-instance + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: instance + plural: instances + singular: instance + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: templates.config.istio.io + labels: + app: mixer + package: template + istio: mixer-template + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: template + plural: templates + singular: template + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: handlers.config.istio.io + labels: + app: mixer + package: handler + istio: mixer-handler + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: handler + plural: handlers + singular: handler + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml new file mode 100755 index 0000000000..2abf66ea4e --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Pod +metadata: + name: helm-allow-crd-rendering-test + namespace: {{ .Release.Namespace }} +spec: + containers: + - name: helm-allow-crd-rendering-test + image: nginx diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml new file mode 100755 index 0000000000..e69de29bb2 diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml new file mode 100755 index 0000000000..a8ce643cc9 --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml @@ -0,0 +1,4 @@ +deprecated: true +description: Chart to test skipping crd rendering +name: skip-rendering-test +version: 0.0.1 diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml new file mode 100755 index 0000000000..05162d6a95 --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -0,0 +1,573 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: virtualservices.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: VirtualService + listKind: VirtualServiceList + plural: virtualservices + singular: virtualservice + shortNames: + - vs + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.gateways + description: The names of gateways and sidecars that should apply these routes + name: Gateways + type: string + - JSONPath: .spec.hosts + description: The destination hosts to which traffic is being sent + name: Hosts + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: destinationrules.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: DestinationRule + listKind: DestinationRuleList + plural: destinationrules + singular: destinationrule + shortNames: + - dr + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.host + description: The name of a service from the service registry + name: Host + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: serviceentries.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: ServiceEntry + listKind: ServiceEntryList + plural: serviceentries + singular: serviceentry + shortNames: + - se + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.hosts + description: The hosts associated with the ServiceEntry + name: Hosts + type: string + - JSONPath: .spec.location + description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + name: Location + type: string + - JSONPath: .spec.resolution + description: Service discovery mode for the hosts (NONE, STATIC, or DNS) + name: Resolution + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: gateways.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: Gateway + plural: gateways + singular: gateway + shortNames: + - gw + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: envoyfilters.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: EnvoyFilter + plural: envoyfilters + singular: envoyfilter + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: clusterrbacconfigs.rbac.istio.io + labels: + app: istio-pilot + istio: rbac + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ClusterRbacConfig + plural: clusterrbacconfigs + singular: clusterrbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: policies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: Policy + plural: policies + singular: policy + categories: + - istio-io + - authentication-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: meshpolicies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: MeshPolicy + listKind: MeshPolicyList + plural: meshpolicies + singular: meshpolicy + categories: + - istio-io + - authentication-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpecBinding + plural: httpapispecbindings + singular: httpapispecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpec + plural: httpapispecs + singular: httpapispec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpecBinding + plural: quotaspecbindings + singular: quotaspecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpec + plural: quotaspecs + singular: quotaspec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rules.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: rule + plural: rules + singular: rule + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: attributemanifests.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: attributemanifest + plural: attributemanifests + singular: attributemanifest + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rbacconfigs.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: RbacConfig + plural: rbacconfigs + singular: rbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: serviceroles.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRole + plural: serviceroles + singular: servicerole + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: servicerolebindings.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRoleBinding + plural: servicerolebindings + singular: servicerolebinding + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 + additionalPrinterColumns: + - JSONPath: .spec.roleRef.name + description: The name of the ServiceRole object being referenced + name: Reference + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: adapters.config.istio.io + labels: + app: mixer + package: adapter + istio: mixer-adapter + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: adapter + plural: adapters + singular: adapter + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: instances.config.istio.io + labels: + app: mixer + package: instance + istio: mixer-instance + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: instance + plural: instances + singular: instance + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: templates.config.istio.io + labels: + app: mixer + package: template + istio: mixer-template + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: template + plural: templates + singular: template + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: handlers.config.istio.io + labels: + app: mixer + package: handler + istio: mixer-handler + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: handler + plural: handlers + singular: handler + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml new file mode 100755 index 0000000000..7be4321a5f --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Pod +metadata: + name: helm-skip-crd-rendering-test + namespace: {{ .Release.Namespace }} +spec: + containers: + - name: helm-skip-crd-rendering-test + image: nginx diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml new file mode 100755 index 0000000000..e69de29bb2 diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/index.ts b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/index.ts new file mode 100644 index 0000000000..6d5b3a9a24 --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/index.ts @@ -0,0 +1,15 @@ +import * as k8s from "@pulumi/kubernetes"; + +const namespace = new k8s.core.v1.Namespace("test"); + +new k8s.helm.v3.Chart("skip-crd-rendering", { + skipCRDRendering: true, + namespace: namespace.metadata.name, + path: "helm-skip-crd-rendering", +}); + +new k8s.helm.v3.Chart("allow-crd-rendering", { + skipCRDRendering: false, + namespace: namespace.metadata.name, + path: "helm-allow-crd-rendering", +}); diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/package.json b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/package.json new file mode 100644 index 0000000000..13965fa992 --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/package.json @@ -0,0 +1,14 @@ +{ + "name": "nodeserver", + "version": "0.1.0", + "dependencies": { + "@pulumi/pulumi": "latest" + }, + "devDependencies": { + "@types/node": "^9.3.0" + }, + "peerDependencies": { + "@pulumi/kubernetes": "latest" + }, + "license": "MIT" +} diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/tsconfig.json b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/tsconfig.json new file mode 100644 index 0000000000..3086b63abd --- /dev/null +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "outDir": "bin", + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "declaration": true, + "sourceMap": true, + "stripInternal": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true, + "strictNullChecks": true + }, + "files": [ + "index.ts" + ] +} From c532ecb5cae163ec232a44b58378237614bf2634 Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Tue, 11 May 2021 23:10:36 -0700 Subject: [PATCH 05/11] Python test --- .../helm-skip-crd-rendering/step1/Pulumi.yaml | 3 + .../helm-skip-crd-rendering/step1/__main__.py | 29 + .../helm-allow-crd-rendering/.helmignore | 21 + .../step1/helm-allow-crd-rendering/Chart.yaml | 4 + .../helm-allow-crd-rendering/crds/crd-10.yaml | 573 ++++++++++++++++++ .../templates/test-pod.yaml | 9 + .../helm-allow-crd-rendering/values.yaml | 0 .../step1/helm-skip-crd-rendering/.helmignore | 21 + .../step1/helm-skip-crd-rendering/Chart.yaml | 4 + .../helm-skip-crd-rendering/crds/crd-10.yaml | 573 ++++++++++++++++++ .../templates/test-pod.yaml | 9 + .../step1/helm-skip-crd-rendering/values.yaml | 0 .../step1/requirements.txt | 1 + tests/sdk/python/python_test.go | 13 + 14 files changed, 1260 insertions(+) create mode 100644 tests/sdk/python/helm-skip-crd-rendering/step1/Pulumi.yaml create mode 100644 tests/sdk/python/helm-skip-crd-rendering/step1/__main__.py create mode 100755 tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore create mode 100755 tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml create mode 100755 tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml create mode 100755 tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml create mode 100755 tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml create mode 100755 tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore create mode 100755 tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml create mode 100755 tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml create mode 100755 tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml create mode 100755 tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml create mode 100644 tests/sdk/python/helm-skip-crd-rendering/step1/requirements.txt diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/Pulumi.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/Pulumi.yaml new file mode 100644 index 0000000000..f74d0c54eb --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/Pulumi.yaml @@ -0,0 +1,3 @@ +name: dotnet-helm-skip-crd-rendering +description: Deploys a simple Helm chart with skipping crd rendering option set +runtime: python diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/__main__.py b/tests/sdk/python/helm-skip-crd-rendering/step1/__main__.py new file mode 100644 index 0000000000..06fc0c923f --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/__main__.py @@ -0,0 +1,29 @@ +# Copyright 2016-2020, Pulumi Corporation. +# +# 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. +from pulumi_kubernetes.core.v1 import Namespace +from pulumi_kubernetes.helm.v3 import Chart, LocalChartOpts + +namespace = Namespace("test") + +Chart("skip-crd-rendering", LocalChartOpts( + skip_crd_rendering=True, + namespace=namespace.metadata["name"], + path="helm-skip-crd-rendering", +)) + +Chart("allow-crd-rendering", LocalChartOpts( + skip_crd_rendering=False, + namespace=namespace.metadata["name"], + path="helm-allow-crd-rendering", +)) diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml new file mode 100755 index 0000000000..6b443eb9d7 --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/Chart.yaml @@ -0,0 +1,4 @@ +deprecated: true +description: Chart to test the default behavior of allowing crd rendering +name: allow-rendering-test +version: 0.0.1 diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml new file mode 100755 index 0000000000..05162d6a95 --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -0,0 +1,573 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: virtualservices.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: VirtualService + listKind: VirtualServiceList + plural: virtualservices + singular: virtualservice + shortNames: + - vs + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.gateways + description: The names of gateways and sidecars that should apply these routes + name: Gateways + type: string + - JSONPath: .spec.hosts + description: The destination hosts to which traffic is being sent + name: Hosts + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: destinationrules.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: DestinationRule + listKind: DestinationRuleList + plural: destinationrules + singular: destinationrule + shortNames: + - dr + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.host + description: The name of a service from the service registry + name: Host + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: serviceentries.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: ServiceEntry + listKind: ServiceEntryList + plural: serviceentries + singular: serviceentry + shortNames: + - se + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.hosts + description: The hosts associated with the ServiceEntry + name: Hosts + type: string + - JSONPath: .spec.location + description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + name: Location + type: string + - JSONPath: .spec.resolution + description: Service discovery mode for the hosts (NONE, STATIC, or DNS) + name: Resolution + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: gateways.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: Gateway + plural: gateways + singular: gateway + shortNames: + - gw + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: envoyfilters.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: EnvoyFilter + plural: envoyfilters + singular: envoyfilter + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: clusterrbacconfigs.rbac.istio.io + labels: + app: istio-pilot + istio: rbac + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ClusterRbacConfig + plural: clusterrbacconfigs + singular: clusterrbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: policies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: Policy + plural: policies + singular: policy + categories: + - istio-io + - authentication-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: meshpolicies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: MeshPolicy + listKind: MeshPolicyList + plural: meshpolicies + singular: meshpolicy + categories: + - istio-io + - authentication-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpecBinding + plural: httpapispecbindings + singular: httpapispecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpec + plural: httpapispecs + singular: httpapispec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpecBinding + plural: quotaspecbindings + singular: quotaspecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpec + plural: quotaspecs + singular: quotaspec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rules.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: rule + plural: rules + singular: rule + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: attributemanifests.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: attributemanifest + plural: attributemanifests + singular: attributemanifest + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rbacconfigs.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: RbacConfig + plural: rbacconfigs + singular: rbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: serviceroles.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRole + plural: serviceroles + singular: servicerole + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: servicerolebindings.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRoleBinding + plural: servicerolebindings + singular: servicerolebinding + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 + additionalPrinterColumns: + - JSONPath: .spec.roleRef.name + description: The name of the ServiceRole object being referenced + name: Reference + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: adapters.config.istio.io + labels: + app: mixer + package: adapter + istio: mixer-adapter + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: adapter + plural: adapters + singular: adapter + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: instances.config.istio.io + labels: + app: mixer + package: instance + istio: mixer-instance + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: instance + plural: instances + singular: instance + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: templates.config.istio.io + labels: + app: mixer + package: template + istio: mixer-template + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: template + plural: templates + singular: template + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: handlers.config.istio.io + labels: + app: mixer + package: handler + istio: mixer-handler + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: handler + plural: handlers + singular: handler + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml new file mode 100755 index 0000000000..2abf66ea4e --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/templates/test-pod.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Pod +metadata: + name: helm-allow-crd-rendering-test + namespace: {{ .Release.Namespace }} +spec: + containers: + - name: helm-allow-crd-rendering-test + image: nginx diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/values.yaml new file mode 100755 index 0000000000..e69de29bb2 diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml new file mode 100755 index 0000000000..a8ce643cc9 --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/Chart.yaml @@ -0,0 +1,4 @@ +deprecated: true +description: Chart to test skipping crd rendering +name: skip-rendering-test +version: 0.0.1 diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml new file mode 100755 index 0000000000..05162d6a95 --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -0,0 +1,573 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: virtualservices.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: VirtualService + listKind: VirtualServiceList + plural: virtualservices + singular: virtualservice + shortNames: + - vs + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.gateways + description: The names of gateways and sidecars that should apply these routes + name: Gateways + type: string + - JSONPath: .spec.hosts + description: The destination hosts to which traffic is being sent + name: Hosts + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: destinationrules.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: DestinationRule + listKind: DestinationRuleList + plural: destinationrules + singular: destinationrule + shortNames: + - dr + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.host + description: The name of a service from the service registry + name: Host + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: serviceentries.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: ServiceEntry + listKind: ServiceEntryList + plural: serviceentries + singular: serviceentry + shortNames: + - se + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 + additionalPrinterColumns: + - JSONPath: .spec.hosts + description: The hosts associated with the ServiceEntry + name: Hosts + type: string + - JSONPath: .spec.location + description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) + name: Location + type: string + - JSONPath: .spec.resolution + description: Service discovery mode for the hosts (NONE, STATIC, or DNS) + name: Resolution + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: gateways.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: Gateway + plural: gateways + singular: gateway + shortNames: + - gw + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: envoyfilters.networking.istio.io + labels: + app: istio-pilot + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: networking.istio.io + names: + kind: EnvoyFilter + plural: envoyfilters + singular: envoyfilter + categories: + - istio-io + - networking-istio-io + scope: Namespaced + version: v1alpha3 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: clusterrbacconfigs.rbac.istio.io + labels: + app: istio-pilot + istio: rbac + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ClusterRbacConfig + plural: clusterrbacconfigs + singular: clusterrbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: policies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: Policy + plural: policies + singular: policy + categories: + - istio-io + - authentication-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: meshpolicies.authentication.istio.io + labels: + app: istio-citadel + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: authentication.istio.io + names: + kind: MeshPolicy + listKind: MeshPolicyList + plural: meshpolicies + singular: meshpolicy + categories: + - istio-io + - authentication-istio-io + scope: Cluster + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpecBinding + plural: httpapispecbindings + singular: httpapispecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: httpapispecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: HTTPAPISpec + plural: httpapispecs + singular: httpapispec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecbindings.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpecBinding + plural: quotaspecbindings + singular: quotaspecbinding + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: quotaspecs.config.istio.io + labels: + app: istio-mixer + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: QuotaSpec + plural: quotaspecs + singular: quotaspec + categories: + - istio-io + - apim-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rules.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: rule + plural: rules + singular: rule + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: attributemanifests.config.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: core + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: attributemanifest + plural: attributemanifests + singular: attributemanifest + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: rbacconfigs.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: RbacConfig + plural: rbacconfigs + singular: rbacconfig + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: serviceroles.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRole + plural: serviceroles + singular: servicerole + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: servicerolebindings.rbac.istio.io + labels: + app: mixer + package: istio.io.mixer + istio: rbac + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: rbac.istio.io + names: + kind: ServiceRoleBinding + plural: servicerolebindings + singular: servicerolebinding + categories: + - istio-io + - rbac-istio-io + scope: Namespaced + version: v1alpha1 + additionalPrinterColumns: + - JSONPath: .spec.roleRef.name + description: The name of the ServiceRole object being referenced + name: Reference + type: string + - JSONPath: .metadata.creationTimestamp + description: |- + CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + name: Age + type: date +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: adapters.config.istio.io + labels: + app: mixer + package: adapter + istio: mixer-adapter + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: adapter + plural: adapters + singular: adapter + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: instances.config.istio.io + labels: + app: mixer + package: instance + istio: mixer-instance + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: instance + plural: instances + singular: instance + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: templates.config.istio.io + labels: + app: mixer + package: template + istio: mixer-template + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: template + plural: templates + singular: template + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1beta1 +metadata: + name: handlers.config.istio.io + labels: + app: mixer + package: handler + istio: mixer-handler + chart: istio + heritage: Tiller + release: istio + annotations: + "helm.sh/resource-policy": keep +spec: + group: config.istio.io + names: + kind: handler + plural: handlers + singular: handler + categories: + - istio-io + - policy-istio-io + scope: Namespaced + version: v1alpha2 +--- diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml new file mode 100755 index 0000000000..7be4321a5f --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/templates/test-pod.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Pod +metadata: + name: helm-skip-crd-rendering-test + namespace: {{ .Release.Namespace }} +spec: + containers: + - name: helm-skip-crd-rendering-test + image: nginx diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/values.yaml new file mode 100755 index 0000000000..e69de29bb2 diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/requirements.txt b/tests/sdk/python/helm-skip-crd-rendering/step1/requirements.txt new file mode 100644 index 0000000000..875bbd5ee3 --- /dev/null +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/requirements.txt @@ -0,0 +1 @@ +pulumi>=2.0.0,<3.0.0 diff --git a/tests/sdk/python/python_test.go b/tests/sdk/python/python_test.go index 5044d42a7a..a85e89aa5a 100644 --- a/tests/sdk/python/python_test.go +++ b/tests/sdk/python/python_test.go @@ -369,6 +369,19 @@ func TestHelmApiVersions(t *testing.T) { integration.ProgramTest(t, &options) } +func TestHelmAllowCRDRendering(t *testing.T) { + test := baseOptions.With(integration.ProgramTestOptions{ + Dir: filepath.Join("helm-skip-crd-rendering", "step1"), + Quick: true, + SkipRefresh: true, // Istio custom resources may exhibit refresh changes. + ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { + assert.NotNil(t, stackInfo.Deployment) + assert.Equal(t, 28, len(stackInfo.Deployment.Resources)) + }, + }) + integration.ProgramTest(t, &test) +} + func TestKustomize(t *testing.T) { cwd, err := os.Getwd() if !assert.NoError(t, err) { From 8f62e647fa20ed6e99bc16fec82e0bc1f9d8cf6d Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Tue, 11 May 2021 23:20:27 -0700 Subject: [PATCH 06/11] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d2c84a290..3f4a79fad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## HEAD (Unreleased) +- Allow opting out of CRD rendering for Helm v3 by specifying `SkipCRDRendering` argument to Helm charts. (https://github.com/pulumi/pulumi-kubernetes/pull/1572) ## 3.1.2 (May 12, 2021) From d23724fd2532644f228d8282f9494c721c9b14cc Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Wed, 12 May 2021 11:26:46 -0700 Subject: [PATCH 07/11] Fix copyright header --- tests/.gitignore | 1 + tests/sdk/dotnet/helm-skip-crd-rendering/step1/Program.cs | 2 +- tests/sdk/python/helm-skip-crd-rendering/step1/__main__.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 tests/.gitignore diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000000..1d74e21965 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1 @@ +.vscode/ diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/Program.cs b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/Program.cs index b94b06d9e4..84fef01148 100644 --- a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/Program.cs +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/Program.cs @@ -1,4 +1,4 @@ -// Copyright 2016-2020, Pulumi Corporation. All rights reserved. +// Copyright 2016-2021, Pulumi Corporation. All rights reserved. using System; using System.Collections.Generic; diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/__main__.py b/tests/sdk/python/helm-skip-crd-rendering/step1/__main__.py index 06fc0c923f..5e7796e7a4 100644 --- a/tests/sdk/python/helm-skip-crd-rendering/step1/__main__.py +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020, Pulumi Corporation. +# Copyright 2016-2021, Pulumi Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 6b6707d9fbe98479602969d615c32541c4a3fc68 Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Wed, 12 May 2021 14:36:59 -0700 Subject: [PATCH 08/11] More dotnet fixes --- .../pkg/gen/dotnet-templates/helm/Unwraps.cs | 32 +++++++++---------- sdk/dotnet/Helm/Unwraps.cs | 32 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/provider/pkg/gen/dotnet-templates/helm/Unwraps.cs b/provider/pkg/gen/dotnet-templates/helm/Unwraps.cs index 63c157473c..f6b754febc 100644 --- a/provider/pkg/gen/dotnet-templates/helm/Unwraps.cs +++ b/provider/pkg/gen/dotnet-templates/helm/Unwraps.cs @@ -69,22 +69,22 @@ internal static class Extensions public static Output> Unwrap(this Union options) { return options.Match( - v => Output.All(ImmutableArray.Create>(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.SkipCRDRendering.ToNullable(), v.Namespace.ToNullable(), v.Values, v.Repo.ToNullable(), v.Chart, v.Version.ToNullable(), v.FetchOptions.Unwrap())).Apply(vs => - Union.FromT0( - new ChartArgsUnwrap - { - ApiVersions = (ImmutableArray)vs[0], - IncludeTestHookResources = (bool)vs[1], - SkipCRDRendering = (bool)vs[2], - Namespace = (string)vs[3], - Values = (ImmutableDictionary)vs[4], - Transformations = v.Transformations, - ResourcePrefix = v.ResourcePrefix, - Repo = (string)vs[5], - Chart = (string)vs[6], - Version = (string)vs[7], - FetchOptions = (ChartFetchArgsUnwrap)vs[8] - })), + v => Output.Tuple(v.ApiVersions, v.Namespace.ToNullable(), v.Values, v.Repo.ToNullable(), v.Chart, v.Version.ToNullable(), v.FetchOptions.Unwrap(), new InputList { v.IncludeTestHookResources.ToNullable(), v.SkipCRDRendering.ToNullable() }).Apply(vs => + Union.FromT0( + new ChartArgsUnwrap + { + ApiVersions = vs.Item1, + Namespace = vs.Item2, + Values = vs.Item3, + Transformations = v.Transformations, + ResourcePrefix = v.ResourcePrefix, + Repo = vs.Item4, + Chart = vs.Item5, + Version = vs.Item6, + FetchOptions = vs.Item7, + IncludeTestHookResources = vs.Item8[0], + SkipCRDRendering = vs.Item8[1] + })), v => Output.Tuple(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.SkipCRDRendering.ToNullable(), v.Namespace.ToNullable(), v.Values).Apply(vs => Union.FromT1( new LocalChartArgsUnwrap diff --git a/sdk/dotnet/Helm/Unwraps.cs b/sdk/dotnet/Helm/Unwraps.cs index 63c157473c..f6b754febc 100644 --- a/sdk/dotnet/Helm/Unwraps.cs +++ b/sdk/dotnet/Helm/Unwraps.cs @@ -69,22 +69,22 @@ internal static class Extensions public static Output> Unwrap(this Union options) { return options.Match( - v => Output.All(ImmutableArray.Create>(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.SkipCRDRendering.ToNullable(), v.Namespace.ToNullable(), v.Values, v.Repo.ToNullable(), v.Chart, v.Version.ToNullable(), v.FetchOptions.Unwrap())).Apply(vs => - Union.FromT0( - new ChartArgsUnwrap - { - ApiVersions = (ImmutableArray)vs[0], - IncludeTestHookResources = (bool)vs[1], - SkipCRDRendering = (bool)vs[2], - Namespace = (string)vs[3], - Values = (ImmutableDictionary)vs[4], - Transformations = v.Transformations, - ResourcePrefix = v.ResourcePrefix, - Repo = (string)vs[5], - Chart = (string)vs[6], - Version = (string)vs[7], - FetchOptions = (ChartFetchArgsUnwrap)vs[8] - })), + v => Output.Tuple(v.ApiVersions, v.Namespace.ToNullable(), v.Values, v.Repo.ToNullable(), v.Chart, v.Version.ToNullable(), v.FetchOptions.Unwrap(), new InputList { v.IncludeTestHookResources.ToNullable(), v.SkipCRDRendering.ToNullable() }).Apply(vs => + Union.FromT0( + new ChartArgsUnwrap + { + ApiVersions = vs.Item1, + Namespace = vs.Item2, + Values = vs.Item3, + Transformations = v.Transformations, + ResourcePrefix = v.ResourcePrefix, + Repo = vs.Item4, + Chart = vs.Item5, + Version = vs.Item6, + FetchOptions = vs.Item7, + IncludeTestHookResources = vs.Item8[0], + SkipCRDRendering = vs.Item8[1] + })), v => Output.Tuple(v.ApiVersions, v.IncludeTestHookResources.ToNullable(), v.SkipCRDRendering.ToNullable(), v.Namespace.ToNullable(), v.Values).Apply(vs => Union.FromT1( new LocalChartArgsUnwrap From d75eb54f7859490d7258fb6026e217f716707dfd Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Wed, 12 May 2021 15:48:47 -0700 Subject: [PATCH 09/11] Reduce test resource counts --- tests/sdk/dotnet/dotnet_test.go | 4 +- .../helm-allow-crd-rendering/crds/crd-10.yaml | 611 ++---------------- .../helm-skip-crd-rendering/crds/crd-10.yaml | 611 ++---------------- tests/sdk/go/go_test.go | 4 +- .../helm-allow-crd-rendering/crds/crd-10.yaml | 611 ++---------------- .../helm-skip-crd-rendering/crds/crd-10.yaml | 611 ++---------------- tests/sdk/nodejs/examples/examples_test.go | 2 +- .../helm-allow-crd-rendering/crds/crd-10.yaml | 611 ++---------------- .../helm-skip-crd-rendering/crds/crd-10.yaml | 611 ++---------------- .../helm-allow-crd-rendering/crds/crd-10.yaml | 611 ++---------------- .../helm-skip-crd-rendering/crds/crd-10.yaml | 611 ++---------------- tests/sdk/python/python_test.go | 4 +- 12 files changed, 319 insertions(+), 4583 deletions(-) diff --git a/tests/sdk/dotnet/dotnet_test.go b/tests/sdk/dotnet/dotnet_test.go index 4459745716..f294ba4b9c 100644 --- a/tests/sdk/dotnet/dotnet_test.go +++ b/tests/sdk/dotnet/dotnet_test.go @@ -147,10 +147,10 @@ func TestDotnet_HelmAllowCRDRendering(t *testing.T) { test := baseOptions.With(integration.ProgramTestOptions{ Dir: filepath.Join("helm-skip-crd-rendering", "step1"), Quick: true, - SkipRefresh: true, // Istio custom resources may exhibit refresh changes. + SkipRefresh: true, ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { assert.NotNil(t, stackInfo.Deployment) - assert.Equal(t, 28, len(stackInfo.Deployment.Resources)) + assert.Equal(t, 8, len(stackInfo.Deployment.Resources)) }, }) integration.ProgramTest(t, &test) diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml index 05162d6a95..75007437c6 100755 --- a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -1,573 +1,40 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualservices.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: VirtualService - listKind: VirtualServiceList - plural: virtualservices - singular: virtualservice - shortNames: - - vs - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.gateways - description: The names of gateways and sidecars that should apply these routes - name: Gateways - type: string - - JSONPath: .spec.hosts - description: The destination hosts to which traffic is being sent - name: Hosts - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: destinationrules.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: DestinationRule - listKind: DestinationRuleList - plural: destinationrules - singular: destinationrule +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + # name must match the spec fields below, and be in the form: . + name: crontabs.stable.example.com +spec: + # group name to use for REST API: /apis// + group: stable.example.com + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: crontabs + # singular name to be used as an alias on the CLI and for display + singular: crontab + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: CronTab + # shortNames allow shorter string to match your resource on the CLI shortNames: - - dr - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.host - description: The name of a service from the service registry - name: Host - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: serviceentries.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: ServiceEntry - listKind: ServiceEntryList - plural: serviceentries - singular: serviceentry - shortNames: - - se - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.hosts - description: The hosts associated with the ServiceEntry - name: Hosts - type: string - - JSONPath: .spec.location - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) - name: Location - type: string - - JSONPath: .spec.resolution - description: Service discovery mode for the hosts (NONE, STATIC, or DNS) - name: Resolution - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: gateways.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: Gateway - plural: gateways - singular: gateway - shortNames: - - gw - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: envoyfilters.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: EnvoyFilter - plural: envoyfilters - singular: envoyfilter - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: clusterrbacconfigs.rbac.istio.io - labels: - app: istio-pilot - istio: rbac - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ClusterRbacConfig - plural: clusterrbacconfigs - singular: clusterrbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: policies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: Policy - plural: policies - singular: policy - categories: - - istio-io - - authentication-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: meshpolicies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: MeshPolicy - listKind: MeshPolicyList - plural: meshpolicies - singular: meshpolicy - categories: - - istio-io - - authentication-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpecBinding - plural: httpapispecbindings - singular: httpapispecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpec - plural: httpapispecs - singular: httpapispec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpecBinding - plural: quotaspecbindings - singular: quotaspecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpec - plural: quotaspecs - singular: quotaspec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rules.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: rule - plural: rules - singular: rule - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: attributemanifests.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: attributemanifest - plural: attributemanifests - singular: attributemanifest - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rbacconfigs.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: RbacConfig - plural: rbacconfigs - singular: rbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: serviceroles.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRole - plural: serviceroles - singular: servicerole - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: servicerolebindings.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRoleBinding - plural: servicerolebindings - singular: servicerolebinding - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 - additionalPrinterColumns: - - JSONPath: .spec.roleRef.name - description: The name of the ServiceRole object being referenced - name: Reference - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: adapters.config.istio.io - labels: - app: mixer - package: adapter - istio: mixer-adapter - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: adapter - plural: adapters - singular: adapter - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: instances.config.istio.io - labels: - app: mixer - package: instance - istio: mixer-instance - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: instance - plural: instances - singular: instance - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: templates.config.istio.io - labels: - app: mixer - package: template - istio: mixer-template - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: template - plural: templates - singular: template - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: handlers.config.istio.io - labels: - app: mixer - package: handler - istio: mixer-handler - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: handler - plural: handlers - singular: handler - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- + - ct diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml index 05162d6a95..75007437c6 100755 --- a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -1,573 +1,40 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualservices.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: VirtualService - listKind: VirtualServiceList - plural: virtualservices - singular: virtualservice - shortNames: - - vs - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.gateways - description: The names of gateways and sidecars that should apply these routes - name: Gateways - type: string - - JSONPath: .spec.hosts - description: The destination hosts to which traffic is being sent - name: Hosts - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: destinationrules.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: DestinationRule - listKind: DestinationRuleList - plural: destinationrules - singular: destinationrule +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + # name must match the spec fields below, and be in the form: . + name: crontabs.stable.example.com +spec: + # group name to use for REST API: /apis// + group: stable.example.com + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: crontabs + # singular name to be used as an alias on the CLI and for display + singular: crontab + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: CronTab + # shortNames allow shorter string to match your resource on the CLI shortNames: - - dr - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.host - description: The name of a service from the service registry - name: Host - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: serviceentries.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: ServiceEntry - listKind: ServiceEntryList - plural: serviceentries - singular: serviceentry - shortNames: - - se - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.hosts - description: The hosts associated with the ServiceEntry - name: Hosts - type: string - - JSONPath: .spec.location - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) - name: Location - type: string - - JSONPath: .spec.resolution - description: Service discovery mode for the hosts (NONE, STATIC, or DNS) - name: Resolution - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: gateways.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: Gateway - plural: gateways - singular: gateway - shortNames: - - gw - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: envoyfilters.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: EnvoyFilter - plural: envoyfilters - singular: envoyfilter - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: clusterrbacconfigs.rbac.istio.io - labels: - app: istio-pilot - istio: rbac - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ClusterRbacConfig - plural: clusterrbacconfigs - singular: clusterrbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: policies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: Policy - plural: policies - singular: policy - categories: - - istio-io - - authentication-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: meshpolicies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: MeshPolicy - listKind: MeshPolicyList - plural: meshpolicies - singular: meshpolicy - categories: - - istio-io - - authentication-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpecBinding - plural: httpapispecbindings - singular: httpapispecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpec - plural: httpapispecs - singular: httpapispec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpecBinding - plural: quotaspecbindings - singular: quotaspecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpec - plural: quotaspecs - singular: quotaspec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rules.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: rule - plural: rules - singular: rule - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: attributemanifests.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: attributemanifest - plural: attributemanifests - singular: attributemanifest - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rbacconfigs.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: RbacConfig - plural: rbacconfigs - singular: rbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: serviceroles.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRole - plural: serviceroles - singular: servicerole - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: servicerolebindings.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRoleBinding - plural: servicerolebindings - singular: servicerolebinding - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 - additionalPrinterColumns: - - JSONPath: .spec.roleRef.name - description: The name of the ServiceRole object being referenced - name: Reference - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: adapters.config.istio.io - labels: - app: mixer - package: adapter - istio: mixer-adapter - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: adapter - plural: adapters - singular: adapter - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: instances.config.istio.io - labels: - app: mixer - package: instance - istio: mixer-instance - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: instance - plural: instances - singular: instance - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: templates.config.istio.io - labels: - app: mixer - package: template - istio: mixer-template - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: template - plural: templates - singular: template - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: handlers.config.istio.io - labels: - app: mixer - package: handler - istio: mixer-handler - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: handler - plural: handlers - singular: handler - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- + - ct diff --git a/tests/sdk/go/go_test.go b/tests/sdk/go/go_test.go index cf2588f65b..224068b2ca 100644 --- a/tests/sdk/go/go_test.go +++ b/tests/sdk/go/go_test.go @@ -103,10 +103,10 @@ func TestGo(t *testing.T) { options := baseOptions.With(integration.ProgramTestOptions{ Dir: filepath.Join("helm-skip-crd-rendering", "step1"), Quick: true, - SkipRefresh: true, // Istio custom resources may exhibit refresh changes. + SkipRefresh: true, ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { assert.NotNil(t, stackInfo.Deployment) - assert.Equal(t, 28, len(stackInfo.Deployment.Resources)) + assert.Equal(t, 8, len(stackInfo.Deployment.Resources)) }, }) integration.ProgramTest(t, &options) diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml index 05162d6a95..75007437c6 100755 --- a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -1,573 +1,40 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualservices.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: VirtualService - listKind: VirtualServiceList - plural: virtualservices - singular: virtualservice - shortNames: - - vs - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.gateways - description: The names of gateways and sidecars that should apply these routes - name: Gateways - type: string - - JSONPath: .spec.hosts - description: The destination hosts to which traffic is being sent - name: Hosts - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: destinationrules.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: DestinationRule - listKind: DestinationRuleList - plural: destinationrules - singular: destinationrule +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + # name must match the spec fields below, and be in the form: . + name: crontabs.stable.example.com +spec: + # group name to use for REST API: /apis// + group: stable.example.com + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: crontabs + # singular name to be used as an alias on the CLI and for display + singular: crontab + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: CronTab + # shortNames allow shorter string to match your resource on the CLI shortNames: - - dr - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.host - description: The name of a service from the service registry - name: Host - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: serviceentries.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: ServiceEntry - listKind: ServiceEntryList - plural: serviceentries - singular: serviceentry - shortNames: - - se - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.hosts - description: The hosts associated with the ServiceEntry - name: Hosts - type: string - - JSONPath: .spec.location - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) - name: Location - type: string - - JSONPath: .spec.resolution - description: Service discovery mode for the hosts (NONE, STATIC, or DNS) - name: Resolution - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: gateways.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: Gateway - plural: gateways - singular: gateway - shortNames: - - gw - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: envoyfilters.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: EnvoyFilter - plural: envoyfilters - singular: envoyfilter - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: clusterrbacconfigs.rbac.istio.io - labels: - app: istio-pilot - istio: rbac - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ClusterRbacConfig - plural: clusterrbacconfigs - singular: clusterrbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: policies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: Policy - plural: policies - singular: policy - categories: - - istio-io - - authentication-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: meshpolicies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: MeshPolicy - listKind: MeshPolicyList - plural: meshpolicies - singular: meshpolicy - categories: - - istio-io - - authentication-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpecBinding - plural: httpapispecbindings - singular: httpapispecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpec - plural: httpapispecs - singular: httpapispec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpecBinding - plural: quotaspecbindings - singular: quotaspecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpec - plural: quotaspecs - singular: quotaspec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rules.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: rule - plural: rules - singular: rule - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: attributemanifests.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: attributemanifest - plural: attributemanifests - singular: attributemanifest - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rbacconfigs.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: RbacConfig - plural: rbacconfigs - singular: rbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: serviceroles.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRole - plural: serviceroles - singular: servicerole - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: servicerolebindings.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRoleBinding - plural: servicerolebindings - singular: servicerolebinding - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 - additionalPrinterColumns: - - JSONPath: .spec.roleRef.name - description: The name of the ServiceRole object being referenced - name: Reference - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: adapters.config.istio.io - labels: - app: mixer - package: adapter - istio: mixer-adapter - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: adapter - plural: adapters - singular: adapter - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: instances.config.istio.io - labels: - app: mixer - package: instance - istio: mixer-instance - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: instance - plural: instances - singular: instance - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: templates.config.istio.io - labels: - app: mixer - package: template - istio: mixer-template - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: template - plural: templates - singular: template - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: handlers.config.istio.io - labels: - app: mixer - package: handler - istio: mixer-handler - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: handler - plural: handlers - singular: handler - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- + - ct diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml index 05162d6a95..75007437c6 100755 --- a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -1,573 +1,40 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualservices.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: VirtualService - listKind: VirtualServiceList - plural: virtualservices - singular: virtualservice - shortNames: - - vs - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.gateways - description: The names of gateways and sidecars that should apply these routes - name: Gateways - type: string - - JSONPath: .spec.hosts - description: The destination hosts to which traffic is being sent - name: Hosts - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: destinationrules.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: DestinationRule - listKind: DestinationRuleList - plural: destinationrules - singular: destinationrule +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + # name must match the spec fields below, and be in the form: . + name: crontabs.stable.example.com +spec: + # group name to use for REST API: /apis// + group: stable.example.com + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: crontabs + # singular name to be used as an alias on the CLI and for display + singular: crontab + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: CronTab + # shortNames allow shorter string to match your resource on the CLI shortNames: - - dr - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.host - description: The name of a service from the service registry - name: Host - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: serviceentries.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: ServiceEntry - listKind: ServiceEntryList - plural: serviceentries - singular: serviceentry - shortNames: - - se - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.hosts - description: The hosts associated with the ServiceEntry - name: Hosts - type: string - - JSONPath: .spec.location - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) - name: Location - type: string - - JSONPath: .spec.resolution - description: Service discovery mode for the hosts (NONE, STATIC, or DNS) - name: Resolution - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: gateways.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: Gateway - plural: gateways - singular: gateway - shortNames: - - gw - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: envoyfilters.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: EnvoyFilter - plural: envoyfilters - singular: envoyfilter - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: clusterrbacconfigs.rbac.istio.io - labels: - app: istio-pilot - istio: rbac - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ClusterRbacConfig - plural: clusterrbacconfigs - singular: clusterrbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: policies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: Policy - plural: policies - singular: policy - categories: - - istio-io - - authentication-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: meshpolicies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: MeshPolicy - listKind: MeshPolicyList - plural: meshpolicies - singular: meshpolicy - categories: - - istio-io - - authentication-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpecBinding - plural: httpapispecbindings - singular: httpapispecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpec - plural: httpapispecs - singular: httpapispec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpecBinding - plural: quotaspecbindings - singular: quotaspecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpec - plural: quotaspecs - singular: quotaspec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rules.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: rule - plural: rules - singular: rule - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: attributemanifests.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: attributemanifest - plural: attributemanifests - singular: attributemanifest - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rbacconfigs.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: RbacConfig - plural: rbacconfigs - singular: rbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: serviceroles.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRole - plural: serviceroles - singular: servicerole - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: servicerolebindings.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRoleBinding - plural: servicerolebindings - singular: servicerolebinding - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 - additionalPrinterColumns: - - JSONPath: .spec.roleRef.name - description: The name of the ServiceRole object being referenced - name: Reference - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: adapters.config.istio.io - labels: - app: mixer - package: adapter - istio: mixer-adapter - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: adapter - plural: adapters - singular: adapter - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: instances.config.istio.io - labels: - app: mixer - package: instance - istio: mixer-instance - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: instance - plural: instances - singular: instance - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: templates.config.istio.io - labels: - app: mixer - package: template - istio: mixer-template - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: template - plural: templates - singular: template - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: handlers.config.istio.io - labels: - app: mixer - package: handler - istio: mixer-handler - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: handler - plural: handlers - singular: handler - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- + - ct diff --git a/tests/sdk/nodejs/examples/examples_test.go b/tests/sdk/nodejs/examples/examples_test.go index 0d9ceaeab7..7236ae8af7 100644 --- a/tests/sdk/nodejs/examples/examples_test.go +++ b/tests/sdk/nodejs/examples/examples_test.go @@ -194,7 +194,7 @@ func TestAccHelmAllowCRDRendering(t *testing.T) { SkipRefresh: true, ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { assert.NotNil(t, stackInfo.Deployment) - assert.Equal(t, 28, len(stackInfo.Deployment.Resources)) + assert.Equal(t, 8, len(stackInfo.Deployment.Resources)) }, }) integration.ProgramTest(t, &test) diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml index 05162d6a95..75007437c6 100755 --- a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -1,573 +1,40 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualservices.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: VirtualService - listKind: VirtualServiceList - plural: virtualservices - singular: virtualservice - shortNames: - - vs - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.gateways - description: The names of gateways and sidecars that should apply these routes - name: Gateways - type: string - - JSONPath: .spec.hosts - description: The destination hosts to which traffic is being sent - name: Hosts - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: destinationrules.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: DestinationRule - listKind: DestinationRuleList - plural: destinationrules - singular: destinationrule +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + # name must match the spec fields below, and be in the form: . + name: crontabs.stable.example.com +spec: + # group name to use for REST API: /apis// + group: stable.example.com + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: crontabs + # singular name to be used as an alias on the CLI and for display + singular: crontab + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: CronTab + # shortNames allow shorter string to match your resource on the CLI shortNames: - - dr - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.host - description: The name of a service from the service registry - name: Host - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: serviceentries.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: ServiceEntry - listKind: ServiceEntryList - plural: serviceentries - singular: serviceentry - shortNames: - - se - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.hosts - description: The hosts associated with the ServiceEntry - name: Hosts - type: string - - JSONPath: .spec.location - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) - name: Location - type: string - - JSONPath: .spec.resolution - description: Service discovery mode for the hosts (NONE, STATIC, or DNS) - name: Resolution - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: gateways.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: Gateway - plural: gateways - singular: gateway - shortNames: - - gw - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: envoyfilters.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: EnvoyFilter - plural: envoyfilters - singular: envoyfilter - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: clusterrbacconfigs.rbac.istio.io - labels: - app: istio-pilot - istio: rbac - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ClusterRbacConfig - plural: clusterrbacconfigs - singular: clusterrbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: policies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: Policy - plural: policies - singular: policy - categories: - - istio-io - - authentication-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: meshpolicies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: MeshPolicy - listKind: MeshPolicyList - plural: meshpolicies - singular: meshpolicy - categories: - - istio-io - - authentication-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpecBinding - plural: httpapispecbindings - singular: httpapispecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpec - plural: httpapispecs - singular: httpapispec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpecBinding - plural: quotaspecbindings - singular: quotaspecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpec - plural: quotaspecs - singular: quotaspec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rules.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: rule - plural: rules - singular: rule - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: attributemanifests.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: attributemanifest - plural: attributemanifests - singular: attributemanifest - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rbacconfigs.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: RbacConfig - plural: rbacconfigs - singular: rbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: serviceroles.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRole - plural: serviceroles - singular: servicerole - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: servicerolebindings.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRoleBinding - plural: servicerolebindings - singular: servicerolebinding - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 - additionalPrinterColumns: - - JSONPath: .spec.roleRef.name - description: The name of the ServiceRole object being referenced - name: Reference - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: adapters.config.istio.io - labels: - app: mixer - package: adapter - istio: mixer-adapter - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: adapter - plural: adapters - singular: adapter - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: instances.config.istio.io - labels: - app: mixer - package: instance - istio: mixer-instance - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: instance - plural: instances - singular: instance - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: templates.config.istio.io - labels: - app: mixer - package: template - istio: mixer-template - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: template - plural: templates - singular: template - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: handlers.config.istio.io - labels: - app: mixer - package: handler - istio: mixer-handler - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: handler - plural: handlers - singular: handler - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- + - ct diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml index 05162d6a95..75007437c6 100755 --- a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -1,573 +1,40 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualservices.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: VirtualService - listKind: VirtualServiceList - plural: virtualservices - singular: virtualservice - shortNames: - - vs - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.gateways - description: The names of gateways and sidecars that should apply these routes - name: Gateways - type: string - - JSONPath: .spec.hosts - description: The destination hosts to which traffic is being sent - name: Hosts - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: destinationrules.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: DestinationRule - listKind: DestinationRuleList - plural: destinationrules - singular: destinationrule +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + # name must match the spec fields below, and be in the form: . + name: crontabs.stable.example.com +spec: + # group name to use for REST API: /apis// + group: stable.example.com + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: crontabs + # singular name to be used as an alias on the CLI and for display + singular: crontab + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: CronTab + # shortNames allow shorter string to match your resource on the CLI shortNames: - - dr - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.host - description: The name of a service from the service registry - name: Host - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: serviceentries.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: ServiceEntry - listKind: ServiceEntryList - plural: serviceentries - singular: serviceentry - shortNames: - - se - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.hosts - description: The hosts associated with the ServiceEntry - name: Hosts - type: string - - JSONPath: .spec.location - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) - name: Location - type: string - - JSONPath: .spec.resolution - description: Service discovery mode for the hosts (NONE, STATIC, or DNS) - name: Resolution - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: gateways.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: Gateway - plural: gateways - singular: gateway - shortNames: - - gw - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: envoyfilters.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: EnvoyFilter - plural: envoyfilters - singular: envoyfilter - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: clusterrbacconfigs.rbac.istio.io - labels: - app: istio-pilot - istio: rbac - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ClusterRbacConfig - plural: clusterrbacconfigs - singular: clusterrbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: policies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: Policy - plural: policies - singular: policy - categories: - - istio-io - - authentication-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: meshpolicies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: MeshPolicy - listKind: MeshPolicyList - plural: meshpolicies - singular: meshpolicy - categories: - - istio-io - - authentication-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpecBinding - plural: httpapispecbindings - singular: httpapispecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpec - plural: httpapispecs - singular: httpapispec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpecBinding - plural: quotaspecbindings - singular: quotaspecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpec - plural: quotaspecs - singular: quotaspec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rules.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: rule - plural: rules - singular: rule - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: attributemanifests.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: attributemanifest - plural: attributemanifests - singular: attributemanifest - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rbacconfigs.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: RbacConfig - plural: rbacconfigs - singular: rbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: serviceroles.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRole - plural: serviceroles - singular: servicerole - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: servicerolebindings.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRoleBinding - plural: servicerolebindings - singular: servicerolebinding - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 - additionalPrinterColumns: - - JSONPath: .spec.roleRef.name - description: The name of the ServiceRole object being referenced - name: Reference - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: adapters.config.istio.io - labels: - app: mixer - package: adapter - istio: mixer-adapter - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: adapter - plural: adapters - singular: adapter - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: instances.config.istio.io - labels: - app: mixer - package: instance - istio: mixer-instance - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: instance - plural: instances - singular: instance - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: templates.config.istio.io - labels: - app: mixer - package: template - istio: mixer-template - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: template - plural: templates - singular: template - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: handlers.config.istio.io - labels: - app: mixer - package: handler - istio: mixer-handler - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: handler - plural: handlers - singular: handler - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- + - ct diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml index 05162d6a95..75007437c6 100755 --- a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -1,573 +1,40 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualservices.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: VirtualService - listKind: VirtualServiceList - plural: virtualservices - singular: virtualservice - shortNames: - - vs - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.gateways - description: The names of gateways and sidecars that should apply these routes - name: Gateways - type: string - - JSONPath: .spec.hosts - description: The destination hosts to which traffic is being sent - name: Hosts - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: destinationrules.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: DestinationRule - listKind: DestinationRuleList - plural: destinationrules - singular: destinationrule +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + # name must match the spec fields below, and be in the form: . + name: crontabs.stable.example.com +spec: + # group name to use for REST API: /apis// + group: stable.example.com + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: crontabs + # singular name to be used as an alias on the CLI and for display + singular: crontab + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: CronTab + # shortNames allow shorter string to match your resource on the CLI shortNames: - - dr - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.host - description: The name of a service from the service registry - name: Host - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: serviceentries.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: ServiceEntry - listKind: ServiceEntryList - plural: serviceentries - singular: serviceentry - shortNames: - - se - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.hosts - description: The hosts associated with the ServiceEntry - name: Hosts - type: string - - JSONPath: .spec.location - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) - name: Location - type: string - - JSONPath: .spec.resolution - description: Service discovery mode for the hosts (NONE, STATIC, or DNS) - name: Resolution - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: gateways.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: Gateway - plural: gateways - singular: gateway - shortNames: - - gw - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: envoyfilters.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: EnvoyFilter - plural: envoyfilters - singular: envoyfilter - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: clusterrbacconfigs.rbac.istio.io - labels: - app: istio-pilot - istio: rbac - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ClusterRbacConfig - plural: clusterrbacconfigs - singular: clusterrbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: policies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: Policy - plural: policies - singular: policy - categories: - - istio-io - - authentication-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: meshpolicies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: MeshPolicy - listKind: MeshPolicyList - plural: meshpolicies - singular: meshpolicy - categories: - - istio-io - - authentication-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpecBinding - plural: httpapispecbindings - singular: httpapispecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpec - plural: httpapispecs - singular: httpapispec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpecBinding - plural: quotaspecbindings - singular: quotaspecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpec - plural: quotaspecs - singular: quotaspec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rules.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: rule - plural: rules - singular: rule - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: attributemanifests.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: attributemanifest - plural: attributemanifests - singular: attributemanifest - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rbacconfigs.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: RbacConfig - plural: rbacconfigs - singular: rbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: serviceroles.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRole - plural: serviceroles - singular: servicerole - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: servicerolebindings.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRoleBinding - plural: servicerolebindings - singular: servicerolebinding - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 - additionalPrinterColumns: - - JSONPath: .spec.roleRef.name - description: The name of the ServiceRole object being referenced - name: Reference - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: adapters.config.istio.io - labels: - app: mixer - package: adapter - istio: mixer-adapter - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: adapter - plural: adapters - singular: adapter - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: instances.config.istio.io - labels: - app: mixer - package: instance - istio: mixer-instance - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: instance - plural: instances - singular: instance - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: templates.config.istio.io - labels: - app: mixer - package: template - istio: mixer-template - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: template - plural: templates - singular: template - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: handlers.config.istio.io - labels: - app: mixer - package: handler - istio: mixer-handler - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: handler - plural: handlers - singular: handler - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- + - ct diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml index 05162d6a95..75007437c6 100755 --- a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -1,573 +1,40 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualservices.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: VirtualService - listKind: VirtualServiceList - plural: virtualservices - singular: virtualservice - shortNames: - - vs - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.gateways - description: The names of gateways and sidecars that should apply these routes - name: Gateways - type: string - - JSONPath: .spec.hosts - description: The destination hosts to which traffic is being sent - name: Hosts - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: destinationrules.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: DestinationRule - listKind: DestinationRuleList - plural: destinationrules - singular: destinationrule +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + # name must match the spec fields below, and be in the form: . + name: crontabs.stable.example.com +spec: + # group name to use for REST API: /apis// + group: stable.example.com + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: crontabs + # singular name to be used as an alias on the CLI and for display + singular: crontab + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: CronTab + # shortNames allow shorter string to match your resource on the CLI shortNames: - - dr - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.host - description: The name of a service from the service registry - name: Host - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: serviceentries.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: ServiceEntry - listKind: ServiceEntryList - plural: serviceentries - singular: serviceentry - shortNames: - - se - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 - additionalPrinterColumns: - - JSONPath: .spec.hosts - description: The hosts associated with the ServiceEntry - name: Hosts - type: string - - JSONPath: .spec.location - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) - name: Location - type: string - - JSONPath: .spec.resolution - description: Service discovery mode for the hosts (NONE, STATIC, or DNS) - name: Resolution - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: gateways.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: Gateway - plural: gateways - singular: gateway - shortNames: - - gw - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: envoyfilters.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: EnvoyFilter - plural: envoyfilters - singular: envoyfilter - categories: - - istio-io - - networking-istio-io - scope: Namespaced - version: v1alpha3 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: clusterrbacconfigs.rbac.istio.io - labels: - app: istio-pilot - istio: rbac - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ClusterRbacConfig - plural: clusterrbacconfigs - singular: clusterrbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: policies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: Policy - plural: policies - singular: policy - categories: - - istio-io - - authentication-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: meshpolicies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: MeshPolicy - listKind: MeshPolicyList - plural: meshpolicies - singular: meshpolicy - categories: - - istio-io - - authentication-istio-io - scope: Cluster - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpecBinding - plural: httpapispecbindings - singular: httpapispecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpec - plural: httpapispecs - singular: httpapispec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpecBinding - plural: quotaspecbindings - singular: quotaspecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpec - plural: quotaspecs - singular: quotaspec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rules.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: rule - plural: rules - singular: rule - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: attributemanifests.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: attributemanifest - plural: attributemanifests - singular: attributemanifest - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rbacconfigs.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: RbacConfig - plural: rbacconfigs - singular: rbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: serviceroles.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRole - plural: serviceroles - singular: servicerole - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: servicerolebindings.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRoleBinding - plural: servicerolebindings - singular: servicerolebinding - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - version: v1alpha1 - additionalPrinterColumns: - - JSONPath: .spec.roleRef.name - description: The name of the ServiceRole object being referenced - name: Reference - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: adapters.config.istio.io - labels: - app: mixer - package: adapter - istio: mixer-adapter - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: adapter - plural: adapters - singular: adapter - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: instances.config.istio.io - labels: - app: mixer - package: instance - istio: mixer-instance - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: instance - plural: instances - singular: instance - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: templates.config.istio.io - labels: - app: mixer - package: template - istio: mixer-template - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: template - plural: templates - singular: template - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: handlers.config.istio.io - labels: - app: mixer - package: handler - istio: mixer-handler - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: handler - plural: handlers - singular: handler - categories: - - istio-io - - policy-istio-io - scope: Namespaced - version: v1alpha2 ---- + - ct diff --git a/tests/sdk/python/python_test.go b/tests/sdk/python/python_test.go index a85e89aa5a..97a56994be 100644 --- a/tests/sdk/python/python_test.go +++ b/tests/sdk/python/python_test.go @@ -373,10 +373,10 @@ func TestHelmAllowCRDRendering(t *testing.T) { test := baseOptions.With(integration.ProgramTestOptions{ Dir: filepath.Join("helm-skip-crd-rendering", "step1"), Quick: true, - SkipRefresh: true, // Istio custom resources may exhibit refresh changes. + SkipRefresh: true, ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { assert.NotNil(t, stackInfo.Deployment) - assert.Equal(t, 28, len(stackInfo.Deployment.Resources)) + assert.Equal(t, 8, len(stackInfo.Deployment.Resources)) }, }) integration.ProgramTest(t, &test) From 5eef3b23bc65330e9eb73611304195a30faa694a Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Wed, 12 May 2021 17:22:45 -0700 Subject: [PATCH 10/11] Set environment variable so go tests use locally built sdk --- .github/workflows/run-acceptance-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 6bf03ee47d..acf219b36b 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -21,6 +21,7 @@ env: PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} VERSION_PREFIX: 3.0.0 + PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. jobs: comment-notification: From 00928c1604ad2e712c8a5f0e523165b2bb59bbe3 Mon Sep 17 00:00:00 2001 From: Vivek Lakshmanan Date: Wed, 12 May 2021 20:14:31 -0700 Subject: [PATCH 11/11] Choose a unique name for crds --- .../step1/helm-allow-crd-rendering/crds/crd-10.yaml | 5 +++-- .../step1/helm-skip-crd-rendering/crds/crd-10.yaml | 5 +++-- .../step1/helm-allow-crd-rendering/crds/crd-10.yaml | 5 +++-- .../step1/helm-skip-crd-rendering/crds/crd-10.yaml | 5 +++-- .../step1/helm-allow-crd-rendering/crds/crd-10.yaml | 5 +++-- .../step1/helm-skip-crd-rendering/crds/crd-10.yaml | 5 +++-- .../step1/helm-allow-crd-rendering/crds/crd-10.yaml | 5 +++-- .../step1/helm-skip-crd-rendering/crds/crd-10.yaml | 5 +++-- 8 files changed, 24 insertions(+), 16 deletions(-) diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml index 75007437c6..6f7baecdf5 100755 --- a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -2,10 +2,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . - name: crontabs.stable.example.com + name: crontabs.dev.example.com spec: # group name to use for REST API: /apis// - group: stable.example.com + group: dev.example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1 @@ -38,3 +38,4 @@ spec: # shortNames allow shorter string to match your resource on the CLI shortNames: - ct + diff --git a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml index 75007437c6..6f7baecdf5 100755 --- a/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/dotnet/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -2,10 +2,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . - name: crontabs.stable.example.com + name: crontabs.dev.example.com spec: # group name to use for REST API: /apis// - group: stable.example.com + group: dev.example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1 @@ -38,3 +38,4 @@ spec: # shortNames allow shorter string to match your resource on the CLI shortNames: - ct + diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml index 75007437c6..6f7baecdf5 100755 --- a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -2,10 +2,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . - name: crontabs.stable.example.com + name: crontabs.dev.example.com spec: # group name to use for REST API: /apis// - group: stable.example.com + group: dev.example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1 @@ -38,3 +38,4 @@ spec: # shortNames allow shorter string to match your resource on the CLI shortNames: - ct + diff --git a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml index 75007437c6..6f7baecdf5 100755 --- a/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/go/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -2,10 +2,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . - name: crontabs.stable.example.com + name: crontabs.dev.example.com spec: # group name to use for REST API: /apis// - group: stable.example.com + group: dev.example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1 @@ -38,3 +38,4 @@ spec: # shortNames allow shorter string to match your resource on the CLI shortNames: - ct + diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml index 75007437c6..6f7baecdf5 100755 --- a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -2,10 +2,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . - name: crontabs.stable.example.com + name: crontabs.dev.example.com spec: # group name to use for REST API: /apis// - group: stable.example.com + group: dev.example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1 @@ -38,3 +38,4 @@ spec: # shortNames allow shorter string to match your resource on the CLI shortNames: - ct + diff --git a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml index 75007437c6..6f7baecdf5 100755 --- a/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/nodejs/examples/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -2,10 +2,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . - name: crontabs.stable.example.com + name: crontabs.dev.example.com spec: # group name to use for REST API: /apis// - group: stable.example.com + group: dev.example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1 @@ -38,3 +38,4 @@ spec: # shortNames allow shorter string to match your resource on the CLI shortNames: - ct + diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml index 75007437c6..6f7baecdf5 100755 --- a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-allow-crd-rendering/crds/crd-10.yaml @@ -2,10 +2,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . - name: crontabs.stable.example.com + name: crontabs.dev.example.com spec: # group name to use for REST API: /apis// - group: stable.example.com + group: dev.example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1 @@ -38,3 +38,4 @@ spec: # shortNames allow shorter string to match your resource on the CLI shortNames: - ct + diff --git a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml index 75007437c6..6f7baecdf5 100755 --- a/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml +++ b/tests/sdk/python/helm-skip-crd-rendering/step1/helm-skip-crd-rendering/crds/crd-10.yaml @@ -2,10 +2,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: # name must match the spec fields below, and be in the form: . - name: crontabs.stable.example.com + name: crontabs.dev.example.com spec: # group name to use for REST API: /apis// - group: stable.example.com + group: dev.example.com # list of versions supported by this CustomResourceDefinition versions: - name: v1 @@ -38,3 +38,4 @@ spec: # shortNames allow shorter string to match your resource on the CLI shortNames: - ct +