Skip to content

Commit

Permalink
Add oc-certification artifacts and update makefile (#115)
Browse files Browse the repository at this point in the history
* Add oc-certification artifacts and update makefile

* Remove staging directory

* Make staging repo

* Rename metric service
  • Loading branch information
asifdxtreme authored Dec 9, 2021
1 parent f87380c commit 1ae1fc5
Show file tree
Hide file tree
Showing 14 changed files with 388 additions and 963 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ pkg/drivers/cpi/test_config.conf
controllers/test_config.conf
spec.yaml
testbin/*
*.DS_STORE
artifacts/staging-openshift
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ARTIFACTS_DIR ?= artifacts
CRC ?= crc
SPEC_FILE ?= vdo-spec.yaml
CRC ?= crc
OC_CERTIFIED_LATEST_VERSION ?= 0.1.0

# Configure the golangci-lint timeout if an environment variable exists
ifneq ($(origin LINT_TIMEOUT), undefined)
Expand Down Expand Up @@ -107,12 +108,14 @@ manifests: controller-gen kustomize ## Generate WebhookConfiguration, ClusterRol
$(KUSTOMIZE) build config/default > $(ARTIFACTS_DIR)/vanilla/vdo-spec.yaml

manifests-openshift: kustomize
@mkdir -p $(ARTIFACTS_DIR)/openshift
$(KUSTOMIZE) build config/rbac > config/openshift/rbac/rbac.yaml
$(KUSTOMIZE) build config/crd > $(ARTIFACTS_DIR)/openshift/crd.yaml
cd config/openshift/rbac && $(KUSTOMIZE) edit set nameprefix vdo-
$(KUSTOMIZE) build config/openshift/rbac > $(ARTIFACTS_DIR)/openshift/rbac.yaml
@cp config/openshift/csv/vsphere-kubernetes-drivers-operator.clusterserviceversion.yaml $(ARTIFACTS_DIR)/openshift/
@echo "** Making manifest based on the latest oc certified version $(OC_CERTIFIED_LATEST_VERSION)"
@mkdir -p $(ARTIFACTS_DIR)/staging-openshift
@cp artifacts/oc-certified/$(OC_CERTIFIED_LATEST_VERSION)/manifests/vsphere-kubernetes-drivers-operator.clusterserviceversion.yaml $(ARTIFACTS_DIR)/staging-openshift/
@cp config/openshift/crd/vdoconfigs.vdo.vmware.com-crd.yaml $(ARTIFACTS_DIR)/staging-openshift/
@cp config/openshift/crd/vspherecloudconfigs.vdo.vmware.com-crd.yaml $(ARTIFACTS_DIR)/staging-openshift/
@cp config/openshift/rbac/vdo-controller-manager-metrics-service.yaml $(ARTIFACTS_DIR)/staging-openshift/
@echo "** Staging manifest has been created in artifacts/openshift"


generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
vdo.vmware.com/managed-by: vdo
name: vdo-controller-manager-metrics-service
spec:
ports:
- name: https
port: 8443
targetPort: https
selector:
control-plane: controller-manager
vdo.vmware.com/managed-by: vdo
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand All @@ -22,10 +23,10 @@ spec:
description: VDOConfig is the Schema for the vdoconfigs API
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'
description: 'Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. '
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'
description: 'Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.'
type: string
metadata:
type: object
Expand Down Expand Up @@ -149,87 +150,3 @@ status:
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
labels:
vdo.vmware.com/managed-by: vdo
name: vspherecloudconfigs.vdo.vmware.com
spec:
group: vdo.vmware.com
names:
kind: VsphereCloudConfig
listKind: VsphereCloudConfigList
plural: vspherecloudconfigs
singular: vspherecloudconfig
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: VsphereCloudConfig is the Schema for the vspherecloudconfigs API
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: VsphereCloudConfigSpec defines the desired state of VsphereCloudConfig
properties:
credentials:
description: Credentials refers to the name of k8s secret storing the VC creds
type: string
datacenters:
description: datacenters refers to list of datacenters on the VC which the configured user account can access
items:
type: string
type: array
insecure:
description: Insecure flag determines if connection to VC can be insecured
type: boolean
thumbprint:
description: thumbprint refers to the SSL Thumbprint to be used to establish a secure connection to VC
type: string
vcIp:
description: VCIP refers to IP of the vcenter which is used to configure for VDO
type: string
required:
- credentials
- datacenters
- insecure
- vcIp
type: object
status:
description: VsphereCloudConfigStatus defines the observed state of VsphereCloudConfig
properties:
config:
description: Config represents the verification status of VDO configuration
enum:
- verified
- failed
type: string
message:
description: Message displays text indicating the reason for failure in validating VDO config
type: string
required:
- config
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
Expand Down Expand Up @@ -36,13 +37,12 @@ metadata:
operators.operatorframework.io/builder: operator-sdk-v1.10.1
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
categories: Integration & Delivery
containerImage: ""
containerImage: projects.registry.vmware.com/vsphere_kubernetes_driver_operator/vdo@sha256:5926db110532ddf7f6eb79d3af661a9545c988def7937dbeb81f4e795482ba2f
createdAt: ""
description: Kubernetes operator to manage lifecycle of vSphere CSI/CPI drivers.
repository: https://github.com/vmware-tanzu/vsphere-kubernetes-drivers-operator
support: VMware
name: vsphere-kubernetes-drivers-operator.v0.1.0
namespace: vmware-system-vdo
spec:
apiservicedefinitions: {}
customresourcedefinitions:
Expand All @@ -55,12 +55,7 @@ spec:
resources:
- kind: Deployment
version: v1
- kind: ServiceAcount
version: v1
- kind: Role
version: v1
- kind: RoleBinding
version: v1
name: "vdo-controller-manager"
specDescriptors:
- description: 'Configuration for vSphere CPI driver'
displayName: 'Cloud Provider'
Expand All @@ -80,12 +75,7 @@ spec:
resources:
- kind: Deployment
version: v1
- kind: ServiceAcount
version: v1
- kind: Role
version: v1
- kind: RoleBinding
version: v1
name: "vdo-controller-manager"
specDescriptors:
- description: 'Credentials to connect to vcenter'
displayName: 'Credentials'
Expand All @@ -106,8 +96,8 @@ spec:
- description: 'Informs the status of vSphere Storage Provider'
displayName: 'Storage Provider'
path: csi
description: 'Vsphere Kubernetes Drivers Operator helps to install/manage vsphere drivers required to run kubernetes workload on vSphere. The operator currently manages CPI and CSI vSphere drivers. The operator exposes two resources: VsphereCloudConfig - represents the connection information required to connect to vcenter. VDOConfig - represents the configuration information w.r.t CPI and CSI'
displayName: Vsphere Kubernetes Drivers Operator
description: 'Vsphere Kubernetes Drivers Operator helps to install/manage vsphere drivers required to run kubernetes workload on vSphere.'
displayName: vsphere-kubernetes-drivers-operator
icon:
- base64data: PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNMzMxLjkyMiwwSDIyNC4wNDRsLTE2LDE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jI4NEExNS40NTgsMTUuNDU4LDAsMCwxLDYyLjg0NCwyNTUuOFY3OC4yN2ExNS40NTcsMTUuNDU3LDAsMCwxLDE1LjQ0LTE1LjQ0SDI1MS41YTE1LjQ1NywxNS40NTcsMCwwLDEsMTUuNDQsMTUuNDRWOTYuMzI0aDE2Vjc4LjI3QTMxLjQ3NiwzMS40NzYsMCwwLDAsMjUxLjUsNDYuODNINzguMjg0YTMxLjQ3NiwzMS40NzYsMCwwLDAtMzEuNDQsMzEuNDRWMjU1LjhhMzEuNDc2LDMxLjQ3NiwwLDAsMCwzMS40NCwzMS40NDFoMjIuMzMyWiIgZmlsbD0iIzAwOTFkYSIvPjwvc3ZnPg==
mediatype: image/svg+xml
Expand Down Expand Up @@ -327,7 +317,7 @@ spec:
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
image: registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:c517c5e91c22279414fc56c777e44641602f01440938cca0bee02a6929fe558e
name: kube-rbac-proxy
ports:
- containerPort: 8443
Expand All @@ -339,25 +329,7 @@ spec:
- --leader-elect
command:
- /manager
env:
- name: MATRIX_CONFIG_CONTENT
valueFrom:
configMapKeyRef:
key: versionConfigContent
name: compat-matrix-config
optional: true
- name: MATRIX_CONFIG_URL
valueFrom:
configMapKeyRef:
key: versionConfigURL
name: compat-matrix-config
optional: true
- name: AUTO_UPGRADE
valueFrom:
configMapKeyRef:
key: auto-upgrade
name: compat-matrix-config
image: default-route-openshift-image-registry.apps-crc.testing/vmware-system-vdo/vdo:c3d1dcd
image: projects.registry.vmware.com/vsphere_kubernetes_driver_operator/vdo@sha256:5926db110532ddf7f6eb79d3af661a9545c988def7937dbeb81f4e795482ba2f
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
Expand Down Expand Up @@ -388,7 +360,6 @@ spec:
nodeSelector:
node-role.kubernetes.io/master: ""
serviceAccountName: vdo-controller-manager
serviceAccount: vdo-controller-manager
terminationGracePeriodSeconds: 10
tolerations:
- effect: NoSchedule
Expand Down Expand Up @@ -459,13 +430,13 @@ spec:
- OpenShift
- k8s
links:
- name: Vsphere Kubernetes Drivers Operator
- name: vsphere-kubernetes-drivers-operator
url: https://github.com/vmware-tanzu/vsphere-kubernetes-drivers-operator
maintainers:
- email: vdo@vmware.com
name: VDO Maintainers
maturity: alpha
minKubeVersion: "1.21"
minKubeVersion: "1.21.7"
provider:
name: VMware
version: 0.1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
labels:
vdo.vmware.com/managed-by: vdo
name: vspherecloudconfigs.vdo.vmware.com
spec:
group: vdo.vmware.com
names:
kind: VsphereCloudConfig
listKind: VsphereCloudConfigList
plural: vspherecloudconfigs
singular: vspherecloudconfig
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: VsphereCloudConfig is the Schema for the vspherecloudconfigs API
properties:
apiVersion:
description: ' Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.'
type: string
kind:
description: 'Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.'
type: string
metadata:
type: object
spec:
description: VsphereCloudConfigSpec defines the desired state of VsphereCloudConfig
properties:
credentials:
description: Credentials refers to the name of k8s secret storing the VC creds
type: string
datacenters:
description: datacenters refers to list of datacenters on the VC which the configured user account can access
items:
type: string
type: array
insecure:
description: Insecure flag determines if connection to VC can be insecured
type: boolean
thumbprint:
description: thumbprint refers to the SSL Thumbprint to be used to establish a secure connection to VC
type: string
vcIp:
description: VCIP refers to IP of the vcenter which is used to configure for VDO
type: string
required:
- credentials
- datacenters
- insecure
- vcIp
type: object
status:
description: VsphereCloudConfigStatus defines the observed state of VsphereCloudConfig
properties:
config:
description: Config represents the verification status of VDO configuration
enum:
- verified
- failed
type: string
message:
description: Message displays text indicating the reason for failure in validating VDO config
type: string
required:
- config
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
11 changes: 11 additions & 0 deletions artifacts/oc-certified/0.1.0/metadata/annotations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
annotations:
operators.operatorframework.io.bundle.channel.default.v1: stable
operators.operatorframework.io.bundle.channels.v1: stable
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: vsphere-kubernetes-drivers-operator

# Annotations to specify OCP versions compatibility.
com.redhat.openshift.versions: v4.6-v4.9
1 change: 1 addition & 0 deletions artifacts/oc-certified/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cert_project_id: 6178282ed33d48b77395bb22
Loading

0 comments on commit 1ae1fc5

Please sign in to comment.