Skip to content
Closed
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
build/_output
build/_test

# Temporary files for CRD schema patching
_output

# Generated mock go files used for testing
pkg/mocks

Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ vendor:
.PHONY: manifests
manifests:
./hack/update-manifests.sh

include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \
targets/openshift/crd-schema-gen.mk \
)

$(call add-crd-gen,config,./vendor/github.com/openshift/api/config/v1,./manifests,./manifests)
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
github.com/openshift/api v0.0.0-20210331193751-3acddb19d360
github.com/openshift/build-machinery-go v0.0.0-20200819073603-48aa266c95f7
github.com/openshift/client-go v0.0.0-20210331195552-cf6c2669e01f
github.com/openshift/library-go v0.0.0-00010101000000-000000000000
github.com/operator-framework/api v0.11.1
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ github.com/opencontainers/runc v0.0.0-20191031171055-b133feaeeb2e/go.mod h1:qT5X
github.com/openshift/api v0.0.0-20200331152225-585af27e34fd h1:f4iPC9iCf1an7qEWpEFvp/swsM79vvBRsJ2twU4D30s=
github.com/openshift/api v0.0.0-20200331152225-585af27e34fd/go.mod h1:RKMJ5CBnljLfnej+BJ/xnOWc3kZDvJUaIAEq2oKSPtE=
github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160/go.mod h1:1CkcsT3aVebzRBzVTSbiKSkJMsC/CASqxesfqEMfJEc=
github.com/openshift/build-machinery-go v0.0.0-20200819073603-48aa266c95f7 h1:mOq7Mg1Q9d7nIDxe1SJ6pluMBQsbVxa6olyAGmfYWTg=
github.com/openshift/build-machinery-go v0.0.0-20200819073603-48aa266c95f7/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0 h1:kMiuiZXH1GdfbiMwsuAQOqGaMxlo9NCUk0wT4XAdfNM=
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0/go.mod h1:uUQ4LClRO+fg5MF/P6QxjMCb1C9f7Oh4RKepftDnEJE=
Expand Down
107 changes: 107 additions & 0 deletions manifests/00_operatorhub.crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
api-approved.openshift.io: https://github.com/openshift/api/pull/470
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
capability.openshift.io/name: "marketplace"
name: operatorhubs.config.openshift.io
spec:
group: config.openshift.io
names:
kind: OperatorHub
listKind: OperatorHubList
plural: operatorhubs
singular: operatorhub
scope: Cluster
versions:
- name: v1
schema:
openAPIV3Schema:
description: OperatorHub is the Schema for the operatorhubs API. It can be
used to change the state of the default hub sources for OperatorHub on the
cluster from enabled to disabled and vice versa.
type: object
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: OperatorHubSpec defines the desired state of OperatorHub
type: object
properties:
disableAllDefaultSources:
description: disableAllDefaultSources allows you to disable all the
default hub sources. If this is true, a specific entry in sources
can be used to enable a default source. If this is false, a specific
entry in sources can be used to disable or enable a default source.
type: boolean
sources:
description: sources is the list of default hub sources and their
configuration. If the list is empty, it implies that the default
hub sources are enabled on the cluster unless disableAllDefaultSources
is true. If disableAllDefaultSources is true and sources is not
empty, the configuration present in sources will take precedence.
The list of default hub sources and their current state will always
be reflected in the status block.
type: array
items:
description: HubSource is used to specify the hub source and its
configuration
type: object
properties:
disabled:
description: disabled is used to disable a default hub source
on cluster
type: boolean
name:
description: name is the name of one of the default hub sources
type: string
maxLength: 253
minLength: 1
status:
description: OperatorHubStatus defines the observed state of OperatorHub.
The current state of the default hub sources will always be reflected
here.
type: object
properties:
sources:
description: sources encapsulates the result of applying the configuration
for each hub source
type: array
items:
description: HubSourceStatus is used to reflect the current state
of applying the configuration to a default source
type: object
properties:
disabled:
description: disabled is used to disable a default hub source
on cluster
type: boolean
message:
description: message provides more information regarding failures
type: string
name:
description: name is the name of one of the default hub sources
type: string
maxLength: 253
minLength: 1
status:
description: status indicates success or failure in applying
the configuration
type: string
served: true
storage: true
subresources:
status: {}
2 changes: 2 additions & 0 deletions tools.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
//go:build tools
// +build tools

package tools

import (
_ "github.com/mikefarah/yq/v3"
_ "github.com/openshift/build-machinery-go"
_ "k8s.io/kube-openapi/cmd/openapi-gen"
)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading