Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ endif
export PATH := $(MYGOBIN):$(PATH)

# Run all tests in this repo for in-tree and out-of-tree functions
all: install-tools license verify-metadata test-in-tree
all: install-tools license validate-metadata test-in-tree

## Run all unit tests and e2e tests for in-tree functions
test-in-tree: e2e-test unit-test lint

# Run all the e2e tests for in-tree functions
e2e-test: build-local $(MYGOBIN)/kustomize
cd tests; \
go test -v ./...
go test -v -run TestExamples

# Validate the metadata for all published functions
validate-metadata:
cd tests; \
go test -v -run TestValidateMetadata

# Run all unit tests for in-tree functions
unit-test:
Expand All @@ -38,10 +43,6 @@ lint:
cd tests; golangci-lint run ./...
cd krm-functions && find . -type f -name go.mod -execdir golangci-lint run ./... \;

# TODO
# Verify the metadata for all in-tree and out-of-tree functions
verify-metadata:

# Install tools needed to run tests
install-tools: \
install-kustomize \
Expand Down
14 changes: 14 additions & 0 deletions publishers/sig-cli/catalogs/v20220225.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
# Copyright 2022 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This file is just a placeholder until we have a published catalog.
102 changes: 51 additions & 51 deletions publishers/sig-cli/functions/render-helm-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
names:
kind: RenderHelmChart
versions:
name: v1
- name: v1
idempotent: true
license: Apache 2.0
maintainers:
Expand Down Expand Up @@ -70,58 +70,58 @@ spec:
items:
type: object
description: parameters to configure the helm chart rendering.
properties:
chartArgs:
description: arguments that describe the chart being rendered.
type: object
properties:
chartArgs:
description: arguments that describe the chart being rendered.
type: object
properties:
name:
description: the name of the chart.
type: string
version:
description: the version of the chart.
type: string
repo:
description: URL locating the chart on the internet
type: string
templateOptions:
description: a collection of fields that map to flag options of `helm template`.
type: object
properties:
apiVersions:
description: kubernetes api versions used for Capabilities.APIVersions
type: array
items:
type: string
releaseName:
description: replaces RELEASE_NAME in the chart template output
type: string
namespace:
description: sets the target namespace for a release (`.Release.Namespace` in the template)
type: string
nameTemplate:
description: specifies the template used to name the release
type: string
includeCRDs:
description: specifies if Helm should also generate CustomResourceDefinitions. Legal values are "true", "false" (default).
type: bool
skipTests:
description: if set, skip tests from templated output. Legal values are "true", "false" (default).
type: bool
values:
description: values to use instead of the default values that accompany the chart.
type: object
properties:
name:
description: the name of the chart.
type: string
version:
description: the version of the chart.
type: string
repo:
description: URL locating the chart on the internet
type: string
templateOptions:
description: a collection of fields that map to flag options of `helm template`.
type: object
properties:
apiVersions:
description: kubernetes api versions used for Capabilities.APIVersions
valuesFiles:
description: remote or local filepaths to use instead of the default values that accompanied the chart. The default values are in '{chartHome}/{name}/values.yaml', where `chartHome` and `name` are the parameters defined above.
type: array
items:
type: string
releaseName:
description: replaces RELEASE_NAME in the chart template output
type: string
namespace: string
description:
type: string
nameTemplate:
description: sets the target namespace for a release (`.Release.Namespace` in the template)
type: string
includeCRDs:
description: specifies if Helm should also generate CustomResourceDefinitions. Legal values are "true", "false" (default).
type: bool
skipTests:
description: if set, skip tests from templated output. Legal values are "true", "false" (default).
type: bool
values:
description: values to use instead of the default values that accompany the chart.
valuesInline:
description: values defined inline to use instead of default values that accompany the chart.
type: object
properties:
valuesFiles:
description: remote or local filepaths to use instead of the default values that accompanied the chart. The default values are in '{chartHome}/{name}/values.yaml', where `chartHome` and `name` are the parameters defined above.
type: array
items:
type: string
valuesInline:
description: values defined inline to use instead of default values that accompany the chart.
type: object
additionalProperties:
type: string
valuesMerge:
description: valuesMerge specifies how to treat ValuesInline with respect to ValuesFiles. Legal values are 'merge', 'override' (default), 'replace'.
type: string
additionalProperties:
type: string
valuesMerge:
description: valuesMerge specifies how to treat ValuesInline with respect to ValuesFiles. Legal values are 'merge', 'override' (default), 'replace'.
type: string
20 changes: 17 additions & 3 deletions tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@ module sigs.k8s.io/krm-functions-registry/tests

go 1.17

require github.com/GoogleContainerTools/kpt v1.0.0-beta.13.0.20220208222711-5169954be82f
require (
github.com/GoogleContainerTools/kpt v1.0.0-beta.13.0.20220208222711-5169954be82f
github.com/stretchr/testify v1.7.0
k8s.io/kube-openapi v0.0.0-20211109043139-026bd182f079
sigs.k8s.io/kustomize/kyaml v0.13.3
sigs.k8s.io/yaml v1.2.0
)

require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-errors/errors v1.4.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
Expand All @@ -15,9 +22,16 @@ require (
github.com/google/go-cmp v0.5.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 // indirect
golang.org/x/text v0.3.6 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/kube-openapi v0.0.0-20211109043139-026bd182f079 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.3 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e // indirect
)

replace sigs.k8s.io/kustomize/kyaml => sigs.k8s.io/kustomize/kyaml v0.13.4-0.20220224183231-6950a0d24640
Loading