Skip to content

Commit

Permalink
fix(csv): only allow one CSV per provided API across intersecting
Browse files Browse the repository at this point in the history
operatorgroups
  • Loading branch information
njhale committed Feb 12, 2019
1 parent 72dbe0d commit 5439461
Show file tree
Hide file tree
Showing 106 changed files with 3,670 additions and 469 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ release:
rm -rf manifests
mkdir manifests
cp -R deploy/ocp/manifests/$(ver)/. manifests
find ./manifests -type f -exec sed -i '' '/^#/d' {} \;
find ./manifests -type f -exec sed -i "/^#/d" {} \;
find ./manifests -type f -exec sed -i "1{/---/d}" {} \;

package: olmref=$(shell docker inspect --format='{{index .RepoDigests 0}}' quay.io/coreos/olm:$(ver))
package:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
properties:
selector:
type: object
description: Label selector to find resources associated with or managed by the operator
description: Optional label selector to find resources associated with or managed by the operator
properties:
matchLabels:
type: object
Expand Down Expand Up @@ -61,11 +61,15 @@ spec:
description: set of values for the expression
targetNamespaces:
type: array
description: Optional list of target namespaces. If set, OLM will ignore selector.
items:
type: string
pattern: ^\S+$
serviceAccountName:
type: string
staticProvidedAPIs:
type: boolean
description: If true, OLM will not modify the OperatorGroup's providedAPIs annotation.
type: object
status:
properties:
Expand All @@ -81,4 +85,4 @@ spec:
- lastUpdated
type: object
required:
- metadata
- metadata
2 changes: 1 addition & 1 deletion deploy/ocp/manifests/0.8.1/0000_50_00-namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_00-namespace.yaml
apiVersion: v1
kind: Namespace
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_01-olm-operator.serviceaccount.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_02-clusterserviceversion.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
2 changes: 1 addition & 1 deletion deploy/ocp/manifests/0.8.1/0000_50_03-installplan.crd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_03-installplan.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_04-subscription.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_05-catalogsource.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_10-olm-operator.deployment.yaml
---
# Source: olm/templates/0000_50_06-olm-operator.deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_11-catalog-operator.deployment.yaml
---
# Source: olm/templates/0000_50_07-catalog-operator.deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_12-aggregated.clusterrole.yaml
---
# Source: olm/templates/0000_50_08-aggregated.clusterrole.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_13-operatorgroup.crd.yaml
---
# Source: olm/templates/0000_50_09-operatorgroup.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -31,7 +31,7 @@ spec:
properties:
selector:
type: object
description: Label selector to find resources associated with or managed by the operator
description: Optional label selector to find resources associated with or managed by the operator
properties:
matchLabels:
type: object
Expand Down Expand Up @@ -63,11 +63,15 @@ spec:
description: set of values for the expression
targetNamespaces:
type: array
description: Optional list of target namespaces. If set, OLM will ignore selector.
items:
type: string
pattern: ^\S+$
serviceAccountName:
type: string
staticProvidedAPIs:
type: boolean
description: If true, OLM will not modify the OperatorGroup's providedAPIs annotation.
type: object
status:
properties:
Expand All @@ -83,4 +87,4 @@ spec:
- lastUpdated
type: object
required:
- metadata
- metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_14-olm-operators.configmap.yaml
---
# Source: olm/templates/0000_50_10-olm-operators.configmap.yaml
kind: ConfigMap
apiVersion: v1
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_15-olm-operators.catalogsource.yaml
---
# Source: olm/templates/0000_50_11-olm-operators.catalogsource.yaml
#! validate-crd: ./deploy/chart/templates/05-catalogsource.crd.yaml
#! parse-kind: CatalogSource
apiVersion: operators.coreos.com/v1alpha1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_16-operatorgroup-default.yaml
---
# Source: olm/templates/0000_50_12-operatorgroup-default.yaml
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_17-packageserver.subscription.yaml
---
# Source: olm/templates/0000_50_13-packageserver.subscription.yaml
#! validate-crd: ./deploy/chart/templates/04-subscription.crd.yaml
#! parse-kind: Subscription
apiVersion: operators.coreos.com/v1alpha1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_18-operatorstatus.yaml
---
# Source: olm/templates/0000_50_14-operatorstatus.yaml

apiVersion: config.openshift.io/v1
kind: ClusterOperator
Expand Down
2 changes: 1 addition & 1 deletion deploy/ocp/manifests/0.8.1/image-references
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/image-references

kind: ImageStream
Expand Down
2 changes: 1 addition & 1 deletion deploy/ocp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ package:
beta.kubernetes.io/os: linux
node-role.kubernetes.io/master: ""
tolerations:
- operator: Exists
- operator: Exists
2 changes: 1 addition & 1 deletion deploy/okd/manifests/0.8.1/0000_50_00-namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_00-namespace.yaml
apiVersion: v1
kind: Namespace
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_01-olm-operator.serviceaccount.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_02-clusterserviceversion.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
2 changes: 1 addition & 1 deletion deploy/okd/manifests/0.8.1/0000_50_03-installplan.crd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_03-installplan.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_04-subscription.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_05-catalogsource.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_10-olm-operator.deployment.yaml
---
# Source: olm/templates/0000_50_06-olm-operator.deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_11-catalog-operator.deployment.yaml
---
# Source: olm/templates/0000_50_07-catalog-operator.deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_12-aggregated.clusterrole.yaml
---
# Source: olm/templates/0000_50_08-aggregated.clusterrole.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_13-operatorgroup.crd.yaml
---
# Source: olm/templates/0000_50_09-operatorgroup.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -31,7 +31,7 @@ spec:
properties:
selector:
type: object
description: Label selector to find resources associated with or managed by the operator
description: Optional label selector to find resources associated with or managed by the operator
properties:
matchLabels:
type: object
Expand Down Expand Up @@ -63,11 +63,15 @@ spec:
description: set of values for the expression
targetNamespaces:
type: array
description: Optional list of target namespaces. If set, OLM will ignore selector.
items:
type: string
pattern: ^\S+$
serviceAccountName:
type: string
staticProvidedAPIs:
type: boolean
description: If true, OLM will not modify the OperatorGroup's providedAPIs annotation.
type: object
status:
properties:
Expand All @@ -83,4 +87,4 @@ spec:
- lastUpdated
type: object
required:
- metadata
- metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_14-olm-operators.configmap.yaml
---
# Source: olm/templates/0000_50_10-olm-operators.configmap.yaml
kind: ConfigMap
apiVersion: v1
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_15-olm-operators.catalogsource.yaml
---
# Source: olm/templates/0000_50_11-olm-operators.catalogsource.yaml
#! validate-crd: ./deploy/chart/templates/05-catalogsource.crd.yaml
#! parse-kind: CatalogSource
apiVersion: operators.coreos.com/v1alpha1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_16-operatorgroup-default.yaml
---
# Source: olm/templates/0000_50_12-operatorgroup-default.yaml
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_17-packageserver.subscription.yaml
---
# Source: olm/templates/0000_50_13-packageserver.subscription.yaml
#! validate-crd: ./deploy/chart/templates/04-subscription.crd.yaml
#! parse-kind: Subscription
apiVersion: operators.coreos.com/v1alpha1
Expand Down
6 changes: 0 additions & 6 deletions deploy/okd/manifests/0.8.1/0000_50_18-operatorstatus.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion deploy/okd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ package:
ref: quay.io/coreos/olm@sha256:995a181839f301585a0e115c083619b6d73812c58a8444d7b13b8e407010325f
pullPolicy: Always
service:
internalPort: 5443
internalPort: 5443
2 changes: 1 addition & 1 deletion deploy/upstream/manifests/0.8.1/0000_50_00-namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_00-namespace.yaml
apiVersion: v1
kind: Namespace
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_01-olm-operator.serviceaccount.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_02-clusterserviceversion.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_03-installplan.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_04-subscription.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##---
---
# Source: olm/templates/0000_50_05-catalogsource.crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_10-olm-operator.deployment.yaml
---
# Source: olm/templates/0000_50_06-olm-operator.deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##---
# Source: olm/templates/0000_50_11-catalog-operator.deployment.yaml
---
# Source: olm/templates/0000_50_07-catalog-operator.deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Loading

0 comments on commit 5439461

Please sign in to comment.