Skip to content

Commit 1bf7d62

Browse files
committed
Update chart to use the new "crds" directory.
Helm 3 will handle CRD installation for CRD manifests located in the chart's "crds" subdirectory, in exchange for dropping template rendering support for CRD manifests. The only CRD template that exists in the OLM chart today is used by a single test of downstream-only behavior. The others are moved to "crds", and the release script has been modified to look in both "templates" and "crds" for manifests. The apiVersion in Chart.yaml has accordingly been bumped to v2 to indicate that it requires Helm 3. On its own, this change is intended to have minimal impact, but it's part of the groundwork for bootstrapping E2E test environments for our upstream CI.
1 parent 64e0a48 commit 1bf7d62

File tree

349 files changed

+23731
-5424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

349 files changed

+23731
-5424
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ clean:
156156

157157
# Generate manifests for CRDs
158158
manifests: vendor
159-
$(CONTROLLER_GEN) schemapatch:manifests=./deploy/chart/templates paths=./pkg/api/apis/operators/... output:dir=./deploy/chart/templates
159+
$(CONTROLLER_GEN) schemapatch:manifests=./deploy/chart/crds paths=./pkg/api/apis/operators/... output:dir=./deploy/chart/crds
160160

161-
$(YQ_INTERNAL) w --inplace deploy/chart/templates/0000_50_olm_03-clusterserviceversion.crd.yaml spec.validation.openAPIV3Schema.properties.spec.properties.install.properties.spec.properties.deployments.items.properties.spec.properties.template.properties.metadata.x-kubernetes-preserve-unknown-fields true
161+
$(YQ_INTERNAL) w --inplace deploy/chart/crds/0000_50_olm_03-clusterserviceversion.crd.yaml spec.validation.openAPIV3Schema.properties.spec.properties.install.properties.spec.properties.deployments.items.properties.spec.properties.template.properties.metadata.x-kubernetes-preserve-unknown-fields true
162162

163163
# Generate clients, listers, and informers
164164
codegen:

deploy/chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
apiVersion: v1
1+
apiVersion: v2
22
description: A Helm chart for Kubernetes
33
name: olm

go.mod

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ require (
1616
github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b
1717
github.com/operator-framework/operator-registry v1.5.8
1818
github.com/otiai10/copy v1.0.1
19-
github.com/pkg/errors v0.8.1
19+
github.com/pkg/errors v0.9.1
2020
github.com/prometheus/client_golang v1.2.1
2121
github.com/sirupsen/logrus v1.4.2
2222
github.com/spf13/cobra v0.0.5
2323
github.com/stretchr/testify v1.4.0
2424
golang.org/x/sys v0.0.0-20191210023423-ac6580df4449 // indirect
2525
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
26-
google.golang.org/grpc v1.24.0
26+
google.golang.org/grpc v1.27.0
2727
gopkg.in/yaml.v2 v2.2.4
28-
helm.sh/helm/v3 v3.0.1
29-
k8s.io/api v0.17.1
30-
k8s.io/apiextensions-apiserver v0.17.1
31-
k8s.io/apimachinery v0.17.1
28+
helm.sh/helm/v3 v3.1.2
29+
k8s.io/api v0.17.2
30+
k8s.io/apiextensions-apiserver v0.17.2
31+
k8s.io/apimachinery v0.17.2
3232
k8s.io/apiserver v0.0.0
3333
k8s.io/client-go v8.0.0+incompatible
3434
k8s.io/code-generator v0.0.0
@@ -41,11 +41,12 @@ require (
4141
)
4242

4343
replace (
44+
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible
4445
github.com/docker/docker => github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309 // Required by Helm
4546
github.com/openshift/api => github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible
4647
github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b
4748
github.com/prometheus/client_golang => github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829
48-
helm.sh/helm/v3 => helm.sh/helm/v3 v3.0.0-beta.5.0.20200123114618-5e3c7d7eb86a
49+
google.golang.org/grpc => google.golang.org/grpc v1.26.0 // https://github.com/etcd-io/etcd/issues/11563
4950

5051
// Pin to kube 1.16
5152
k8s.io/api => k8s.io/api v0.0.0-20190918155943-95b840bb6a1f

go.sum

Lines changed: 126 additions & 21 deletions
Large diffs are not rendered by default.

scripts/package_release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ echo "Version: $1" >> ${charttmpdir}/Chart.yaml
2121

2222
mkdir -p ${chartdir}
2323

24-
go run -mod=vendor helm.sh/helm/v3/cmd/helm template -n olm -f ${values} ${charttmpdir} --output-dir ${charttmpdir}
24+
go run -mod=vendor helm.sh/helm/v3/cmd/helm template -n olm -f ${values} --include-crds --output-dir ${charttmpdir} ${charttmpdir}
2525

26-
cp -R ${charttmpdir}/olm/templates/. ${chartdir}
26+
cp -R "${charttmpdir}"/olm/{templates,crds}/. "${chartdir}"

0 commit comments

Comments
 (0)