Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move sed a few lines higher #532

Merged
merged 3 commits into from Sep 3, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 8 additions & 7 deletions build/generate-manifests.sh
Expand Up @@ -44,11 +44,17 @@ function checkDependencies() {
}

function generateCRDs() {
#go run -mod=vendor github.com/operator-framework/operator-sdk/cmd/operator-sdk generate crds --crd-version v1
go run -mod=vendor sigs.k8s.io/controller-tools/cmd/controller-gen crd \
paths=./pkg/apis/maistra/... \
crd:maxDescLen=0,preserveUnknownFields=false,crdVersions=v1beta1 \
output:crd:dir=./deploy/crds
output:dir=./deploy/crds
# workaround for https://github.com/kubernetes-sigs/controller-tools/issues/457
#sed -i -e "s/\( *\)\(description\: The IP protocol for this port\)/\1default: TCP\n\1\2/" \
# deploy/crds/maistra.io_servicemeshcontrolplanes.yaml
sed -i -e '/x-kubernetes-list-map-keys:/,/x-kubernetes-list-type: map/ { /- protocol/d }' deploy/crds/maistra.io_servicemeshcontrolplanes.yaml

# The data generated by the OLM tooling adds a number of dashes to the top that don't parse properly. This fixes it.
sed -i -e '/---/d' deploy/crds/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment about why we're doing this. It's not obvious, because it shouldn't be a problem applying the resource and there's nothing to tie it back to problems with OLM metadata builds.


mv deploy/crds/maistra.io_servicemeshcontrolplanes.yaml ${BUNDLE_DIR}/servicemeshcontrolplanes.crd.yaml
mv deploy/crds/maistra.io_servicemeshmemberrolls.yaml ${BUNDLE_DIR}/servicemeshmemberrolls.crd.yaml
Expand All @@ -62,11 +68,6 @@ function generateCRDs() {
echo -e "\n---\n" >>deploy/src/crd.yaml
cat ${BUNDLE_DIR}/servicemeshmembers.crd.yaml >>deploy/src/crd.yaml

currentDir=$(pwd)
cd ${BUNDLE_DIR}
sed -i -e '/x-kubernetes-list-map-keys:/,/x-kubernetes-list-type: map/ { /- protocol/d }' *.crd.yaml
sed -i -e '/---/d' *.crd.yaml
cd ${currentDir}
}

function generateDeploymentFile() {
Expand Down
8 changes: 0 additions & 8 deletions deploy/maistra-operator.yaml
@@ -1,6 +1,5 @@
# Autogenerated from files in deploy/src by generate-manifests.sh

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -707,7 +706,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1074,7 +1072,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1443,7 +1440,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1773,7 +1769,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -2168,7 +2163,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -3026,7 +3020,6 @@ status:
---


---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -3138,7 +3131,6 @@ status:
---


---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
8 changes: 0 additions & 8 deletions deploy/servicemesh-operator.yaml
@@ -1,6 +1,5 @@
# Autogenerated from files in deploy/src by generate-manifests.sh

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -707,7 +706,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1074,7 +1072,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1443,7 +1440,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1773,7 +1769,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -2168,7 +2163,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -3026,7 +3020,6 @@ status:
---


---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -3138,7 +3131,6 @@ status:
---


---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
8 changes: 0 additions & 8 deletions deploy/src/crd.yaml
@@ -1,5 +1,4 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -706,7 +705,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1073,7 +1071,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1442,7 +1439,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1772,7 +1768,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -2167,7 +2162,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -3025,7 +3019,6 @@ status:
---


---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -3137,7 +3130,6 @@ status:
---


---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
Expand Up @@ -12,7 +12,7 @@ metadata:
The Maistra Operator enables you to install, configure, and manage an instance of Maistra service mesh. Maistra is based on the open source Istio project.

containerImage: maistra/istio-ubi8-operator:2.0.0
createdAt: 2020-08-27T16:32:55MDT
createdAt: 2020-09-03T15:52:56EDT
support: Red Hat, Inc.
olm.skipRange: ">=1.0.2 <2.0.0"
alm-examples: |-
Expand Down
6 changes: 0 additions & 6 deletions manifests-maistra/2.0.0/servicemeshcontrolplanes.crd.yaml
@@ -1,5 +1,4 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -706,7 +705,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1073,7 +1071,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1442,7 +1439,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -1772,7 +1768,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down Expand Up @@ -2167,7 +2162,6 @@ spec:
type: array
x-kubernetes-list-map-keys:
- port
- protocol
x-kubernetes-list-type: map
publishNotReadyAddresses:
type: boolean
Expand Down
1 change: 0 additions & 1 deletion manifests-maistra/2.0.0/servicemeshmemberrolls.crd.yaml
@@ -1,5 +1,4 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
1 change: 0 additions & 1 deletion manifests-maistra/2.0.0/servicemeshmembers.crd.yaml
@@ -1,5 +1,4 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
Expand Up @@ -12,7 +12,7 @@ metadata:
The OpenShift Service Mesh Operator enables you to install, configure, and manage an instance of Red Hat OpenShift Service Mesh. OpenShift Service Mesh is based on the open source Istio project.

containerImage: registry.redhat.io/openshift-service-mesh/istio-rhel8-operator:2.0.0
createdAt: 2020-09-03T10:26:57EDT
createdAt: 2020-09-03T15:53:01EDT
support: Red Hat, Inc.
olm.skipRange: ">=1.0.2 <2.0.0"
alm-examples: |-
Expand Down Expand Up @@ -248,6 +248,7 @@ spec:
url: https://github.com/Maistra/istio-operator
- name: Bugs
url: https://issues.redhat.com/projects/OSSM
replaces: servicemeshoperator.v1.1.4
installModes:
- type: OwnNamespace
supported: false
Expand Down