Skip to content

Commit

Permalink
fix make bundle, and update bundle manifests, remove /deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
kaovilai committed Oct 13, 2021
1 parent 664d295 commit b733e59
Show file tree
Hide file tree
Showing 25 changed files with 716 additions and 73 deletions.
9 changes: 9 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
domain: quay.io
layout:
- go.kubebuilder.io/v3
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
projectName: OADP Operator
repo: github.com/openshift/oadp-operator
version: "3"
20 changes: 20 additions & 0 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM scratch

# Core bundle labels.
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=init
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.10.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/

# Copy files to locations specified by labels.
COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/
COPY bundle/tests/scorecard /tests/scorecard/
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ spec:
spec:
description: VeleroSpec defines the desired state of Velero
properties:
backupImages:
description: BackupImages is used to specify whether you want to deploy
a registry for enabling backup and restore of images
type: boolean
backupStorageLocations:
description: Velero configuration
description: BackupStorageLocations defines the list of desired configuration
to use for BackupStorageLocations
items:
description: BackupStorageLocationSpec defines the desired state
of a Velero BackupStorageLocation
Expand Down Expand Up @@ -114,6 +119,8 @@ spec:
type: object
type: array
customVeleroPlugins:
description: CustomVeleroPlugins defines the custom plugin to be installed
with Velero
items:
properties:
image:
Expand All @@ -126,33 +133,76 @@ spec:
type: object
type: array
defaultVeleroPlugins:
description: Plugin configuration
description: DefaultVeleroPlugins defines the list of default plugins
(aws, gcp, azure, openshift, csi) to be installed with Velero
items:
type: string
type: array
enableRestic:
description: Restic options. When false or missing, operator will
attempt to delete Restic DaemonSet
description: EnableRestic is a boolean to specify if restic daemonset
instance should be created or not
type: boolean
noDefaultBackupLocation:
description: If you need to install Velero without a default backup
storage location NoDefaultBackupLocation flag is required for confirmation
type: boolean
noobaa:
description: Noobaa is a boolean to specify if we should install backup
storage from OCS operator with Noobaa
type: boolean
olmManaged:
description: 'Important: Run "make" to regenerate code after modifying
this file Determine whether this was installed via OLM'
type: boolean
podAnnotations:
additionalProperties:
type: string
description: add annotations to pods deployed by operator
type: object
podDnsConfig:
description: PodDNSConfig defines the DNS parameters of a pod in addition
to those generated from DNSPolicy. https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
properties:
nameservers:
description: A list of DNS name server IP addresses. This will
be appended to the base nameservers generated from DNSPolicy.
Duplicated nameservers will be removed.
items:
type: string
type: array
options:
description: A list of DNS resolver options. This will be merged
with the base options generated from DNSPolicy. Duplicated entries
will be removed. Resolution options given in Options will override
those that appear in the base DNSPolicy.
items:
description: PodDNSConfigOption defines DNS resolver options
of a pod.
properties:
name:
description: Required.
type: string
value:
type: string
type: object
type: array
searches:
description: A list of DNS search domains for host-name lookup.
This will be appended to the base search paths generated from
DNSPolicy. Duplicated search paths will be removed.
items:
type: string
type: array
type: object
podDnsPolicy:
description: DNSPolicy defines how a pod's DNS will be configured.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
type: string
resticNodeSelector:
additionalProperties:
type: string
description: ResticNodeSelector defines the nodeSelector to be supplied
to Restic podSpec
type: object
resticResourceAllocations:
description: ResourceRequirements describes the compute resource requirements.
description: ResticResourceAllocations defines the CPU and Memory
resource allocations for the restic Pod
properties:
limits:
additionalProperties:
Expand All @@ -178,13 +228,19 @@ spec:
type: object
type: object
resticSupplementalGroups:
description: ResticSupplementalGroups defines the linux groups to
be applied to the Restic Pod
items:
format: int64
type: integer
type: array
resticTimeout:
description: ResticTimeout defines the Restic timeout, default value
is 1h
type: string
resticTolerations:
description: ResticTolerations defines the list of tolerations to
be applied to Restic daemonset
items:
description: The pod this Toleration is attached to tolerates any
taint that matches the triple <key,value,effect> using the matching
Expand Down Expand Up @@ -223,16 +279,25 @@ spec:
type: string
type: object
type: array
restoreResourcesVersionPriority:
description: RestoreResourceVersionPriority represents a configmap
that will be created if defined for use in conjunction with `EnableAPIGroupVersions`
feature flag Defining this field automatically add EnableAPIGroupVersions
to the velero server feature flag
type: string
unsupportedOverrides:
additionalProperties:
type: string
type: object
veleroFeatureFlags:
description: VeleroFeatureFlags defines the list of features to enable
for Velero instance
items:
type: string
type: array
veleroResourceAllocations:
description: ResourceRequirements describes the compute resource requirements.
description: VeleroResourceAllocations defines the CPU and Memory
resource allocations for the Velero Pod
properties:
limits:
additionalProperties:
Expand All @@ -258,7 +323,8 @@ spec:
type: object
type: object
veleroTolerations:
description: We do not currently support setting tolerations for Velero
description: VeleroTolerations defines the list of tolerations to
be applied to Velero deployment
items:
description: The pod this Toleration is attached to tolerates any
taint that matches the triple <key,value,effect> using the matching
Expand Down Expand Up @@ -298,6 +364,8 @@ spec:
type: object
type: array
volumeSnapshotLocations:
description: VolumeSnapshotLocations defines the list of desired configuration
to use for VolumeSnapshotLocations
items:
description: VolumeSnapshotLocationSpec defines the specification
for a Velero VolumeSnapshotLocation.
Expand All @@ -314,8 +382,6 @@ spec:
- provider
type: object
type: array
required:
- backupStorageLocations
type: object
status:
description: VeleroStatus defines the observed state of Velero
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
control-plane: controller-manager
name: openshift-adp-controller-manager-metrics-service
spec:
ports:
- name: https
port: 8443
targetPort: https
selector:
control-plane: controller-manager
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
creationTimestamp: null
name: openshift-adp-controller-manager
17 changes: 17 additions & 0 deletions bundle/manifests/openshift-adp-manager-config_v1_configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
data:
controller_manager_config.yaml: |
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
kind: ControllerManagerConfig
health:
healthProbeBindAddress: :8081
metrics:
bindAddress: 127.0.0.1:8080
webhook:
port: 9443
leaderElection:
leaderElect: true
resourceName: 8b4defce.openshift.io
kind: ConfigMap
metadata:
name: openshift-adp-manager-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: openshift-adp-metrics-reader
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
annotations:
# Core bundle annotations.
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: init
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.10.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3

# Annotations for testing.
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
operators.operatorframework.io.test.config.v1: tests/scorecard/
49 changes: 49 additions & 0 deletions bundle/tests/scorecard/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: scorecard.operatorframework.io/v1alpha3
kind: Configuration
metadata:
name: config
stages:
- parallel: true
tests:
- entrypoint:
- scorecard-test
- basic-check-spec
image: quay.io/operator-framework/scorecard-test:v1.10.0
labels:
suite: basic
test: basic-check-spec-test
- entrypoint:
- scorecard-test
- olm-bundle-validation
image: quay.io/operator-framework/scorecard-test:v1.10.0
labels:
suite: olm
test: olm-bundle-validation-test
- entrypoint:
- scorecard-test
- olm-crds-have-validation
image: quay.io/operator-framework/scorecard-test:v1.10.0
labels:
suite: olm
test: olm-crds-have-validation-test
- entrypoint:
- scorecard-test
- olm-crds-have-resources
image: quay.io/operator-framework/scorecard-test:v1.10.0
labels:
suite: olm
test: olm-crds-have-resources-test
- entrypoint:
- scorecard-test
- olm-spec-descriptors
image: quay.io/operator-framework/scorecard-test:v1.10.0
labels:
suite: olm
test: olm-spec-descriptors-test
- entrypoint:
- scorecard-test
- olm-status-descriptors
image: quay.io/operator-framework/scorecard-test:v1.10.0
labels:
suite: olm
test: olm-status-descriptors-test
Loading

0 comments on commit b733e59

Please sign in to comment.