Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ IMAGE_TAG ?= "dev"
SPECIFIC_UNIT_TEST := $(if $(TEST),-run $(TEST),)
LOCAL_NAMESPACE := "olm"
export GO111MODULE=on
CONTROLLER_GEN := go run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen
YQ_INTERNAL := go run ./vendor/github.com/mikefarah/yq/v2/

# ART builds are performed in dist-git, with content (but not commits) copied
# from the source repo. Thus at build time if your code is inspecting the local
Expand Down Expand Up @@ -156,7 +158,9 @@ codegen:
go run vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go --logtostderr -i ./vendor/k8s.io/apimachinery/pkg/runtime,./vendor/k8s.io/apimachinery/pkg/apis/meta/v1,./vendor/k8s.io/apimachinery/pkg/version,./pkg/package-server/apis/operators/v1,./pkg/package-server/apis/apps/v1alpha1,./pkg/api/apis/operators/v1alpha1,./pkg/lib/version -p $(PKG)/pkg/package-server/apis/openapi -O zz_generated.openapi -h boilerplate.go.txt -r /dev/null
$(CODEGEN_INTERNAL) deepcopy,conversion,client,lister,informer $(PKG)/pkg/api/client $(PKG)/pkg/api/apis $(PKG)/pkg/api/apis "operators:v1alpha1,v1"
$(CODEGEN_INTERNAL) all $(PKG)/pkg/package-server/client $(PKG)/pkg/package-server/apis $(PKG)/pkg/package-server/apis "operators:v1 apps:v1alpha1"

$(CONTROLLER_GEN) schemapatch:manifests=./deploy/chart/templates paths=./pkg/api/apis/operators/v1alpha1/... output:dir=./deploy/chart/templates
$(CONTROLLER_GEN) schemapatch:manifests=./deploy/chart/templates paths=./pkg/api/apis/operators/v1/... output:dir=./deploy/chart/templates
$(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
container-codegen:
docker build -t olm:codegen -f codegen.Dockerfile .
docker run --name temp-codegen olm:codegen /bin/true
Expand Down Expand Up @@ -226,9 +230,9 @@ endif
ifndef ver
$(error ver is undefined)
endif
yq w -i deploy/$(target)/values.yaml olm.image.ref $(olmref)
yq w -i deploy/$(target)/values.yaml catalog.image.ref $(olmref)
yq w -i deploy/$(target)/values.yaml package.image.ref $(olmref)
$(YQ_INTERNAL) w -i deploy/$(target)/values.yaml olm.image.ref $(olmref)
$(YQ_INTERNAL) w -i deploy/$(target)/values.yaml catalog.image.ref $(olmref)
$(YQ_INTERNAL) w -i deploy/$(target)/values.yaml package.image.ref $(olmref)
./scripts/package_release.sh $(ver) deploy/$(target)/manifests/$(ver) deploy/$(target)/values.yaml
ln -sfFn ./$(ver) deploy/$(target)/manifests/latest
ifeq ($(quickstart), true)
Expand Down
8,706 changes: 8,186 additions & 520 deletions deploy/chart/templates/0000_50_olm_03-clusterserviceversion.crd.yaml

Large diffs are not rendered by default.

172 changes: 151 additions & 21 deletions deploy/chart/templates/0000_50_olm_04-installplan.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ metadata:
name: installplans.operators.coreos.com
annotations:
displayName: Install Plan
description: Represents a plan to install and resolve dependencies for Cluster Services
description: Represents a plan to install and resolve dependencies for Cluster
Services
spec:
group: operators.coreos.com
version: v1alpha1
Expand Down Expand Up @@ -39,36 +40,165 @@ spec:
status: {}
validation:
openAPIV3Schema:
description: Represents a plan to install and resolve dependencies for Cluster Services.
description: InstallPlan defines the installation of a set of operators.
type: object
required:
- metadata
- spec
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: InstallPlanSpec defines a set of Application resources to be
installed
type: object
description: Spec for an InstallPlan
required:
- clusterServiceVersionNames
- approval
- approved
- clusterServiceVersionNames
properties:
approval:
description: Approval is the user approval policy for an InstallPlan.
type: string
approved:
type: boolean
clusterServiceVersionNames:
type: array
items:
type: string
source:
type: string
description: Name of the preferred CatalogSource
sourceNamespace:
type: string
description: Namespace that contains the preffered CatalogSource
clusterServiceVersionNames:
status:
description: "InstallPlanStatus represents the information about the status
of steps required to complete installation. \n Status may trail the actual
state of a system."
type: object
required:
- catalogSources
- phase
properties:
attenuatedServiceAccountRef:
description: AttenuatedServiceAccountRef references the service account
that is used to do scoped operator install.
type: object
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of an
entire object, this string should contain a valid JSON/Go field
access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen only
to have some well-defined way of referencing a part of an object.
TODO: this design is not final and this field is subject to change
in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference is
made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
catalogSources:
type: array
description: A list of the names of the Cluster Services
items:
type: string
anyOf:
- properties:
approval:
enum:
- Manual
approved:
type: boolean
required:
- approved
- properties:
approval:
enum:
- Automatic
conditions:
type: array
items:
description: InstallPlanCondition represents the overall status of
the execution of an InstallPlan.
type: object
properties:
lastTransitionTime:
type: string
format: date-time
lastUpdateTime:
type: string
format: date-time
message:
type: string
reason:
description: ConditionReason is a camelcased reason for the state
transition.
type: string
status:
type: string
type:
description: InstallPlanConditionType describes the state of an
InstallPlan at a certain point as a whole.
type: string
phase:
description: InstallPlanPhase is the current status of a InstallPlan
as a whole.
type: string
plan:
type: array
items:
description: Step represents the status of an individual step in an
InstallPlan.
type: object
required:
- resolving
- resource
- status
properties:
resolving:
type: string
resource:
description: StepResource represents the status of a resource
to be tracked by an InstallPlan.
type: object
required:
- group
- kind
- name
- sourceName
- sourceNamespace
- version
properties:
group:
type: string
kind:
type: string
manifest:
type: string
name:
type: string
sourceName:
type: string
sourceNamespace:
type: string
version:
type: string
status:
description: StepStatus is the current status of a particular
resource an in InstallPlan
type: string
Loading