Skip to content

Commit

Permalink
Update Operator Dev preview to v0.0.2 (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
VaishnaviHire authored Jul 10, 2023
1 parent 28a3ece commit 7e904df
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
IMAGE_OWNER ?= opendatahub
VERSION ?= 0.0.1
VERSION ?= 0.0.2
# IMAGE_TAG_BASE defines the opendatahub.io namespace and part of the image name for remote images.
# This variable is used to construct full image tags for bundle and catalog images.
#
Expand Down
2 changes: 1 addition & 1 deletion apis/dscinitialization/v1alpha1/dscinitialization_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type DSCInitializationSpec struct {

type Monitoring struct {
// +kubebuilder:default=false
Enabled bool `json:"enabled,omitempty"`
Enabled bool `json:"enabled,omitempty"`
// +kubebuilder:default=opendatahub
Namespace string `json:"namespace,omitempty"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: datascienceclusters.datasciencecluster.opendatahub.io
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: dscinitializations.dscinitialization.opendatahub.io
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ metadata:
operators.operatorframework.io/internal-objects: '[dscinitialization.opendatahub.io]'
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/opendatahub-io/opendatahub-operator
name: opendatahub-operator.v0.0.1
name: opendatahub-operator.v0.0.2
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -390,7 +390,7 @@ spec:
- --leader-elect
command:
- /manager
image: quay.io/opendatahub/opendatahub-operator:dev-0.0.1
image: quay.io/opendatahub/opendatahub-operator:dev-0.0.2
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -478,4 +478,4 @@ spec:
maturity: alpha
provider:
name: ODH
version: 0.0.1
version: 0.0.2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: datascienceclusters.datasciencecluster.opendatahub.io
spec:
group: datasciencecluster.opendatahub.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: dscinitializations.dscinitialization.opendatahub.io
spec:
group: dscinitialization.opendatahub.io
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ kind: Kustomization
images:
- name: controller
newName: quay.io/opendatahub/opendatahub-operator
newTag: dev-0.0.1
newTag: dev-0.0.2
1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: controller-manager-role
rules:
- apiGroups:
Expand Down
2 changes: 1 addition & 1 deletion controllers/dscinitialization/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func configureBlackboxExporter(dsciInit *dsci.DSCInitialization, cli client.Clie
return err
}
}

if apierrs.IsNotFound(err) || strings.Contains(consoleRoute.Spec.Host, "redhat.com") {
err := deploy.DeployManifestsFromPath(dsciInit, cli,
deploy.DefaultManifestPath+"/monitoring/blackbox-exporter/internal",
Expand Down
51 changes: 28 additions & 23 deletions docs/Dev-Preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,40 @@ released in phases and will be made available before release in the form of a `c

```console
$ cat <<EOF | oc create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: opendatahub-dev-catalog
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/opendatahub/opendatahub-operator-catalog:$RELEASE_TAG
displayName: Open Data Hub Operator (Preview)
publisher: ODH
EOF
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: opendatahub-dev-catalog
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/opendatahub/opendatahub-operator-catalog:$RELEASE_TAG
displayName: Open Data Hub Operator (Preview)
publisher: ODH
EOF

```
3. Subscribe to the ODH custom catalog
```console
$ cat <<EOF | oc create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: opendatahub-operator
namespace: openshift-operators
spec:
channel: fast
name: opendatahub-operator
source: opendatahub-dev-catalog
sourceNamespace: openshift-marketplace
EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: opendatahub-operator
namespace: openshift-operators
spec:
channel: fast
name: opendatahub-operator
source: opendatahub-dev-catalog
sourceNamespace: openshift-marketplace
EOF
```

4. Delete CatalogSource and Subscription after use.
```console
oc delete subscription/opendatahub-dev-catalog -n openshift-operators
oc delete catalogsource/opendatahub-dev-catalog -n openshift-marketplace
```

## Usage

1. When Operator is installed it creates a namespace called `opendatahub`.
Expand Down

0 comments on commit 7e904df

Please sign in to comment.