ibm / operator-sample-go Goto Github PK
View Code? Open in Web Editor NEWKubernetes Operator Samples using Go, the Operator SDK and OLM
Home Page: https://ibm.github.io/operator-sample-go-documentation/
License: Apache License 2.0
Kubernetes Operator Samples using Go, the Operator SDK and OLM
Home Page: https://ibm.github.io/operator-sample-go-documentation/
License: Apache License 2.0
Issue:
Change versions.env to versions-local.env in OpenShift with OLM manual
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/DbSetupWithoutOLM.md
Issue:
The database operator does not work for classic because it has a hardcoded storage class of "ibmc-vpc-block-5iops-tier". Actually, if you don't specify a storage class in the StatefulSet, a default is used by IBM Cloud, meaning the operator will work correctly in both VPC and classic.
This also makes it easier to deploy to a tech zone environment, which has a suitable environments for classic but not VPC.
Issue:
databasebackups.database.sample.third.party "databasebackup-manual" not found
Link to the documentation:
https://github.com/IBM/operator-sample-go/tree/main/operator-database-backup
Issue:
After running the script sh scripts/demo-openshift-operators.sh app demo reset, new Catalog sources are successfully created for the Application and Database operators. However, these Catalog sources can only be seen when in namespace OpenShift-operators. Every other Catalog source has "cluster wide" scope, and our Catalogs should be the same.
See menu Administration->Cluster Settings->OperatorHub
Link to the documentation:
Issue:
In Database Operator - Operator deployed without OLM, in "Build and push new image"
source ../versions_local.env
should be:
source ../versions.env
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/DbSetupWithoutOLM.md
kubectl apply -f prometheus/role-openshift.yaml
does no longer existkubectl apply -f prometheus/role-all.yaml
does no longer existDocumentation in the main repository
https://github.com/IBM/operator-sample-go/tree/main/documentation
Documentation in the documentation repository
https://github.com/thomassuedbroecker/operator-sample-go-documentation
Remove not needed documentation.
Issue:
The script runs to completion but the Application operator and CRD remain.
Log file:
pw%
deleeuw@uk.ibm.com@Adams-MacBook-Pro operator-sample-go % pwd
/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go
deleeuw@uk.ibm.com@Adams-MacBook-Pro operator-sample-go % cd operator-database
oc apply -f config/samples/database.sample_v1alpha1_databasecluster.yaml
Warning: oc apply should be used on resource created by either oc create --save-config or oc apply
namespace/database configured
Warning: oc apply should be used on resource created by either oc create --save-config or oc apply
databasecluster.database.sample.third.party/databasecluster-sample configured
deleeuw@uk.ibm.com@Adams-MacBook-Pro operator-database % kubectl create job --from=cronjob/application-scaler manuallytriggered -n application-beta
job.batch/manuallytriggered created
deleeuw@uk.ibm.com@Adams-MacBook-Pro operator-database % pwd
/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/operator-database
deleeuw@uk.ibm.com@Adams-MacBook-Pro operator-database % cd ..
deleeuw@uk.ibm.com@Adams-MacBook-Pro operator-sample-go % sh scripts/delete-everything-openshift.sh
Init logfile delete-all-openshift.log
Delete prometheus configuration
clusterrole.rbac.authorization.k8s.io "prometheus-k8s-role" deleted
clusterrolebinding.rbac.authorization.k8s.io "prometheus-k8s-rolebinding-olm" deleted
clusterrole.rbac.authorization.k8s.io "application-scaler-role" deleted
clusterrolebinding.rbac.authorization.k8s.io "application-scaler-rolebinding" deleted
*** delete secrets
warning: --force is ignored because --grace-period is not 0.
secret "prometheus-token-secret" deleted
warning: --force is ignored because --grace-period is not 0.
secret "prometheus-cert-secret" deleted
Error from server (NotFound): secrets "prometheus-token-secret" not found
Error from server (NotFound): secrets "prometheus-cert-secret" not found
Delete for ci configuration
Delete microservice application (ci)
namespace "application-beta" deleted
application.application.sample.ibm.com "application" deleted
namespace "application-alpha" deleted
Error from server (NotFound): error when deleting "config/samples/application.sample_v1alpha1_application.yaml": applications.application.sample.ibm.com "application" not found
No resources found in application-beta namespace.
No resources found in application-alpha namespace.
No resources found in application-beta namespace.
No resources found in application-alpha namespace.
Delete database instance (ci)
*** delete database instances
database.database.sample.third.party "database" deleted
Error from server (NotFound): error when deleting "config/samples/database.sample_v1alpha1_databasebackup.yaml": databasebackups.database.sample.third.party "databasebackup-manual" not found
namespace "database" deleted
databasecluster.database.sample.third.party "databasecluster-sample" deleted
Error from server (NotFound): namespaces "database" not found
Delete database operator (ci)
*** delete subcription and catalogsource
error: the path "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/scripts/openshift-database-subscription.yaml" does not exist
error: the path "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/scripts/openshift-database-catalogsource.yaml" does not exist
*** delete customresourcedefinition
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
warning: deleting cluster-scoped resources, not scoped to the provided namespace
customresourcedefinition.apiextensions.k8s.io "databasebackups.database.sample.third.party" force deleted
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
warning: deleting cluster-scoped resources, not scoped to the provided namespace
customresourcedefinition.apiextensions.k8s.io "databases.database.sample.third.party" force deleted
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
warning: deleting cluster-scoped resources, not scoped to the provided namespace
customresourcedefinition.apiextensions.k8s.io "databaseclusters.database.sample.third.party" force deleted
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
operator.operators.coreos.com "operator-database.openshift-operators" force deleted
*** delete deployment in namespace: openshift-operators
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
deployment.apps "operator-database-controller-manager" force deleted
*** delete deployment
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
clusterrole.rbac.authorization.k8s.io "operator-database-metrics-reader" force deleted
Delete OLM deployments (ci)
subscription.operators.coreos.com "operator-application-v0-0-1-sub" deleted
catalogsource.operators.coreos.com "operator-application-catalog" deleted
NAMESPACE NAME DISPLAY TYPE PUBLISHER AGE
openshift-marketplace certified-operators Certified Operators grpc Red Hat 6h17m
openshift-marketplace community-operators Community Operators grpc Red Hat 6h17m
openshift-marketplace operator-database-catalog IBM Build Labs Database Catalog grpc IBM Build Labs 4h33m
openshift-marketplace redhat-marketplace Red Hat Marketplace grpc Red Hat 6h17m
openshift-marketplace redhat-operators Red Hat Operators grpc Red Hat 6h17m
NAMESPACE NAME PACKAGE SOURCE CHANNEL
openshift-operators operator-database-v0-0-1-sub operator-database operator-database-catalog alpha
*** delete subscription and catalogsource application
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (NotFound): subscriptions.operators.coreos.com "operator-application-v0-0-1-sub" not found
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (NotFound): catalogsources.operators.coreos.com "operator-application-catalog" not found
Error: unknown shorthand flag: 'a' in -all-namespaces
Usage:
oc get [(-o|--output=)json|yaml|wide|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=...] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags]
Examples:
oc get pods
oc get pods -o wide
oc get replicationcontroller web
oc get deployments.v1.apps -o json
oc get -o json pod web-pod-13je7
oc get -f pod.yaml -o json
oc get -k dir/
oc get -o template pod/web-pod-13je7 --template={{.status.phase}}
oc get pod test-pod -o custom-columns=CONTAINER:.spec.containers[0].name,IMAGE:.spec.containers[0].image
oc get rc,services
oc get rc/web service/frontend pods/web-pod-13je7
Options:
-A, --all-namespaces=false: If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
--allow-missing-template-keys=true: If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
--chunk-size=500: Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.
--field-selector='': Selector (field query) to filter on, supports '=', '==', and '!='.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.
-f, --filename=[]: Filename, directory, or URL to files identifying the resource to get from a server.
--ignore-not-found=false: If the requested object does not exist the command will return exit code 0.
-k, --kustomize='': Process the kustomization directory. This flag can't be used together with -f or -R.
-L, --label-columns=[]: Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag options like -L label1 -L label2...
--no-headers=false: When using the default or custom-column output format, don't print headers (default print headers).
-o, --output='': Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--raw='': Raw URI to request from the server. Uses the transport specified by the kubeconfig file.
-R, --recursive=false: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-l, --selector='': Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--server-print=true: If true, have the server return the appropriate table output. Supports extension APIs and CRDs.
--show-kind=false: If present, list the resource type for the requested object(s).
--show-labels=false: When printing, show all labels as the last column (default hide labels column)
--sort-by='': If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
--template='': Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
-w, --watch=false: After listing/getting the requested object, watch for changes. Uninitialized objects are excluded if no object name is provided.
--watch-only=false: Watch for changes to the requested object(s), without listing/getting first.
Use "oc options" for a list of global command-line options (applies to all commands).
grep: openshift-marketplace: No such file or directory
*** delete subscription and catalogsource database
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
subscription.operators.coreos.com "operator-database-v0-0-1-sub" force deleted
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
catalogsource.operators.coreos.com "operator-database-catalog" force deleted
No resources found.
NAMESPACE NAME DISPLAY TYPE PUBLISHER AGE
openshift-marketplace certified-operators Certified Operators grpc Red Hat 6h17m
openshift-marketplace community-operators Community Operators grpc Red Hat 6h17m
openshift-marketplace redhat-marketplace Red Hat Marketplace grpc Red Hat 6h17m
openshift-marketplace redhat-operators Red Hat Operators grpc Red Hat 6h17m
*** delete clusterserviceversion database
warning: --force is ignored because --grace-period is not 0.
clusterserviceversion.operators.coreos.com "operator-database.v0.0.1" deleted
grep: openshift-operators: No such file or directory
*** delete cluster service versions
*** delete subscription and catalogsource database
Error from server (NotFound): error when deleting "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/scripts/openshift-database-subscription.yaml": subscriptions.operators.coreos.com "operator-database-v0-0-1-sub" not found
Error from server (NotFound): error when deleting "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/scripts/openshift-database-catalogsource.yaml": catalogsources.operators.coreos.com "operator-database-catalog" not found
No resources found in openshift-operators namespace.
NAME DISPLAY TYPE PUBLISHER AGE
certified-operators Certified Operators grpc Red Hat 6h18m
community-operators Community Operators grpc Red Hat 6h18m
redhat-marketplace Red Hat Marketplace grpc Red Hat 6h18m
redhat-operators Red Hat Operators grpc Red Hat 6h18m
*** delete clusterserviceversion database
error: the path "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/bundle/manifests/operator-database.clusterserviceversion.yaml" does not exist
Error from server (NotFound): namespaces "application-beta" not found
Delete namespaces related to application operator (ci)
*** delete project application
warning: --force is ignored because --grace-period is not 0.
Error from server (NotFound): namespaces "application-alpha" not found
warning: --force is ignored because --grace-period is not 0.
Error from server (NotFound): namespaces "application-beta" not found
Delete database application (ci)
*** delete project database
warning: --force is ignored because --grace-period is not 0.
Error from server (NotFound): namespaces "database" not found
Delete for local configuration
Delete microservice application (local)
Error from server (NotFound): error when deleting "config/samples/application.sample_v1beta1_application.yaml": namespaces "application-beta" not found
Error from server (NotFound): error when deleting "config/samples/application.sample_v1beta1_application.yaml": applications.application.sample.ibm.com "application" not found
Error from server (NotFound): error when deleting "config/samples/application.sample_v1alpha1_application.yaml": namespaces "application-alpha" not found
Error from server (NotFound): error when deleting "config/samples/application.sample_v1alpha1_application.yaml": applications.application.sample.ibm.com "application" not found
No resources found in application-beta namespace.
No resources found in application-alpha namespace.
No resources found in application-beta namespace.
No resources found in application-alpha namespace.
Delete database instance (local)
*** delete database instances
error: unable to recognize "config/samples/database.sample_v1alpha1_database.yaml": no matches for kind "Database" in version "database.sample.third.party/v1alpha1"
error: unable to recognize "config/samples/database.sample_v1alpha1_databasebackup.yaml": no matches for kind "DatabaseBackup" in version "database.sample.third.party/v1alpha1"
Error from server (NotFound): error when deleting "config/samples/database.sample_v1alpha1_databasecluster.yaml": namespaces "database" not found
unable to recognize "config/samples/database.sample_v1alpha1_databasecluster.yaml": no matches for kind "DatabaseCluster" in version "database.sample.third.party/v1alpha1"
error: the server doesn't have a resource type "databasecluster"
Delete database operator (local)
*** delete subcription and catalogsource
Error from server (NotFound): error when deleting "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/scripts/openshift-database-subscription.yaml": subscriptions.operators.coreos.com "operator-database-v0-0-1-sub" not found
error: the path "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/scripts/openshift-database-catalogsource.yaml" does not exist
*** delete customresourcedefinition
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
warning: deleting cluster-scoped resources, not scoped to the provided namespace
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "databasebackups.database.sample.third.party" not found
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
warning: deleting cluster-scoped resources, not scoped to the provided namespace
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "databases.database.sample.third.party" not found
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
warning: deleting cluster-scoped resources, not scoped to the provided namespace
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "databaseclusters.database.sample.third.party" not found
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
operator.operators.coreos.com "operator-database.openshift-operators" force deleted
*** delete deployment in namespace: openshift-operators
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (NotFound): deployments.apps "operator-database-controller-manager" not found
*** delete deployment
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (NotFound): clusterroles.rbac.authorization.k8s.io "operator-database-metrics-reader" not found
Delete OLM deployments (local)
Error from server (NotFound): error when deleting "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/scripts/openshift-application-subscription.yaml": subscriptions.operators.coreos.com "operator-application-v0-0-1-sub" not found
Error from server (NotFound): error when deleting "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/scripts/openshift-application-catalogsource.yaml": catalogsources.operators.coreos.com "operator-application-catalog" not found
NAMESPACE NAME DISPLAY TYPE PUBLISHER AGE
openshift-marketplace certified-operators Certified Operators grpc Red Hat 6h18m
openshift-marketplace community-operators Community Operators grpc Red Hat 6h18m
openshift-marketplace redhat-marketplace Red Hat Marketplace grpc Red Hat 6h18m
openshift-marketplace redhat-operators Red Hat Operators grpc Red Hat 6h18m
No resources found.
*** delete subscription and catalogsource application
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (NotFound): subscriptions.operators.coreos.com "operator-application-v0-0-1-sub" not found
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (NotFound): catalogsources.operators.coreos.com "operator-application-catalog" not found
Error: unknown shorthand flag: 'a' in -all-namespaces
Usage:
oc get [(-o|--output=)json|yaml|wide|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=...] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags]
Examples:
oc get pods
oc get pods -o wide
oc get replicationcontroller web
oc get deployments.v1.apps -o json
oc get -o json pod web-pod-13je7
oc get -f pod.yaml -o json
oc get -k dir/
oc get -o template pod/web-pod-13je7 --template={{.status.phase}}
oc get pod test-pod -o custom-columns=CONTAINER:.spec.containers[0].name,IMAGE:.spec.containers[0].image
oc get rc,services
oc get rc/web service/frontend pods/web-pod-13je7
Options:
-A, --all-namespaces=false: If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
--allow-missing-template-keys=true: If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
--chunk-size=500: Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.
--field-selector='': Selector (field query) to filter on, supports '=', '==', and '!='.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.
-f, --filename=[]: Filename, directory, or URL to files identifying the resource to get from a server.
--ignore-not-found=false: If the requested object does not exist the command will return exit code 0.
-k, --kustomize='': Process the kustomization directory. This flag can't be used together with -f or -R.
-L, --label-columns=[]: Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag options like -L label1 -L label2...
--no-headers=false: When using the default or custom-column output format, don't print headers (default print headers).
-o, --output='': Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
--raw='': Raw URI to request from the server. Uses the transport specified by the kubeconfig file.
-R, --recursive=false: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
-l, --selector='': Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
--server-print=true: If true, have the server return the appropriate table output. Supports extension APIs and CRDs.
--show-kind=false: If present, list the resource type for the requested object(s).
--show-labels=false: When printing, show all labels as the last column (default hide labels column)
--sort-by='': If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
--template='': Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
-w, --watch=false: After listing/getting the requested object, watch for changes. Uninitialized objects are excluded if no object name is provided.
--watch-only=false: Watch for changes to the requested object(s), without listing/getting first.
Use "oc options" for a list of global command-line options (applies to all commands).
grep: openshift-marketplace: No such file or directory
*** delete subscription and catalogsource database
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (NotFound): subscriptions.operators.coreos.com "operator-database-v0-0-1-sub" not found
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (NotFound): catalogsources.operators.coreos.com "operator-database-catalog" not found
No resources found.
NAMESPACE NAME DISPLAY TYPE PUBLISHER AGE
openshift-marketplace certified-operators Certified Operators grpc Red Hat 6h19m
openshift-marketplace community-operators Community Operators grpc Red Hat 6h19m
openshift-marketplace redhat-marketplace Red Hat Marketplace grpc Red Hat 6h19m
openshift-marketplace redhat-operators Red Hat Operators grpc Red Hat 6h19m
*** delete clusterserviceversion database
warning: --force is ignored because --grace-period is not 0.
Error from server (NotFound): clusterserviceversions.operators.coreos.com "operator-database.v0.0.1" not found
grep: openshift-operators: No such file or directory
*** delete cluster service versions
*** delete subscription and catalogsource database
Error from server (NotFound): error when deleting "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/scripts/openshift-database-subscription.yaml": subscriptions.operators.coreos.com "operator-database-v0-0-1-sub" not found
Error from server (NotFound): error when deleting "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/scripts/openshift-database-catalogsource.yaml": catalogsources.operators.coreos.com "operator-database-catalog" not found
No resources found in openshift-operators namespace.
NAME DISPLAY TYPE PUBLISHER AGE
certified-operators Certified Operators grpc Red Hat 6h19m
community-operators Community Operators grpc Red Hat 6h19m
redhat-marketplace Red Hat Marketplace grpc Red Hat 6h19m
redhat-operators Red Hat Operators grpc Red Hat 6h19m
*** delete clusterserviceversion database
error: the path "/Users/[email protected]/Documents/Work/Code/operator-sample-go-automationscript/operator-sample-go/bundle/manifests/operator-database.clusterserviceversion.yaml" does not exist
Error from server (NotFound): namespaces "application-beta" not found
Delete namespaces related to application operator (local)
*** delete project application
warning: --force is ignored because --grace-period is not 0.
Error from server (NotFound): namespaces "application-alpha" not found
warning: --force is ignored because --grace-period is not 0.
Error from server (NotFound): namespaces "application-beta" not found
Delete database application (local)
*** delete project database
warning: --force is ignored because --grace-period is not 0.
Error from server (NotFound): namespaces "database" not found
Delete cert manager
customresourcedefinition.apiextensions.k8s.io "certificaterequests.cert-manager.io" deleted
customresourcedefinition.apiextensions.k8s.io "certificates.cert-manager.io" deleted
customresourcedefinition.apiextensions.k8s.io "challenges.acme.cert-manager.io" deleted
customresourcedefinition.apiextensions.k8s.io "clusterissuers.cert-manager.io" deleted
customresourcedefinition.apiextensions.k8s.io "issuers.cert-manager.io" deleted
customresourcedefinition.apiextensions.k8s.io "orders.acme.cert-manager.io" deleted
namespace "cert-manager" deleted
serviceaccount "cert-manager-cainjector" deleted
serviceaccount "cert-manager" deleted
serviceaccount "cert-manager-webhook" deleted
configmap "cert-manager-webhook" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-cainjector" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-controller-issuers" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-controller-certificates" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-controller-orders" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-controller-challenges" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-view" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-edit" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" deleted
clusterrole.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" deleted
clusterrolebinding.rbac.authorization.k8s.io "cert-manager-cainjector" deleted
clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-issuers" deleted
clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-clusterissuers" deleted
clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-certificates" deleted
clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-orders" deleted
clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-challenges" deleted
clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-ingress-shim" deleted
clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-approve:cert-manager-io" deleted
clusterrolebinding.rbac.authorization.k8s.io "cert-manager-controller-certificatesigningrequests" deleted
clusterrolebinding.rbac.authorization.k8s.io "cert-manager-webhook:subjectaccessreviews" deleted
role.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" deleted
role.rbac.authorization.k8s.io "cert-manager:leaderelection" deleted
role.rbac.authorization.k8s.io "cert-manager-webhook:dynamic-serving" deleted
rolebinding.rbac.authorization.k8s.io "cert-manager-cainjector:leaderelection" deleted
rolebinding.rbac.authorization.k8s.io "cert-manager:leaderelection" deleted
rolebinding.rbac.authorization.k8s.io "cert-manager-webhook:dynamic-serving" deleted
service "cert-manager" deleted
service "cert-manager-webhook" deleted
deployment.apps "cert-manager-cainjector" deleted
deployment.apps "cert-manager" deleted
deployment.apps "cert-manager-webhook" deleted
mutatingwebhookconfiguration.admissionregistration.k8s.io "cert-manager-webhook" deleted
validatingwebhookconfiguration.admissionregistration.k8s.io "cert-manager-webhook" deleted
All delete commands were executed
deleeuw@uk.ibm.com@Adams-MacBook-Pro operator-sample-go %
Link to the documentation:
Issue:
The documentation is partly wrong and we need to correct or delete that documentation.
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/operator-application-scaler/README.md
Related issue: #74
please clarify why ctx is not a pointer at
/kind documentation
Issue:
Deploying without OLM contains installation of OLM as a prerequisite
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/Prerequisites.md
Issue:
First step, in the "prereq" the user must run "sh scripts/check-prerequisites.sh" but no indication in which folder! That comes later in the documentation!
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/Prerequisites.md
Issue:
.yaml is missing in Operator-database with OLM
kubectl apply -f config/samples/database.sample_v1alpha1_databasecluster
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/DbSetupWithOLM.md
Getting issue while running Application Operator Locally:-
make install run ENABLE_WEBHOOKS=false
getting following after few seconds:-
INFO Stopping and waiting for non leader election runnables
1.6539787910293398e+09 INFO Stopping and waiting for leader election runnables
1.653978791029361e+09 INFO Stopping and waiting for caches
1.653978791029579e+09 INFO Stopping and waiting for webhooks
1.6539787910296168e+09 INFO Wait completed, proceeding to shutdown the manager
1.653978791029632e+09 ERROR setup problem running manager {"error": "failed to wait for application caches to sync: timed out waiting for cache to be synced"}
main.main
/Users/diwakartiwari/ibm/operator-sample-go/operator-application/main.go:95
runtime.main
/usr/local/go/src/runtime/proc.go:255
exit status 1
make: *** [run] Error 1
Expected
it should continuously run and following should be able to run
kubectl get applications.application.sample.ibm.com/application -n application-beta -oyaml
kubectl exec -n application-beta $(kubectl get pods -n application-beta | awk '/application-deployment-microservice/ {print $1;exit}') --container application-microservice -- curl -s http://localhost:8081/hello
sh scripts/ci-create-operators-openshift.sh app ci reset podman_reset
No resources found in openshift-operators namespace.
Status:
2022-05-31 10:11:26 Status: installplans()
Issue:
The script code for deleting these secrets is not correct:
prometheus-token-secret
prometheus-cert-secret
The script does this:
oc delete --force secret prometheus-token-secret -n openshift-operators
oc delete --force secret prometheus-token-secret -n application-beta
oc get secret prometheus-token-secret -n openshift-operators
oc get secret prometheus-token-secret -n application-beta
but it should do something like this:
oc delete --force secret prometheus-cert-secret -n application-beta
oc delete --force secret prometheus-token-secret -n application-beta
oc get secret prometheus-cert-secret -n application-beta
oc get secret prometheus-token-secret -n application-beta
Link to the documentation:
Issue:
The script ci-create-operators-kubernetes.sh app ci reset podman_reset
10 mins later:
Status:
2022-06-01 08:41:29 Status: installplans()
------------------------------------------------------------------------
Status:
2022-06-01 08:41:33 Status: installplans()
Link to the documentation and scripts:
Issue:
While testing test case 10 I used the script delete-everything-openshift.sh. After 2 hours of running, it seems to be stuck in a loop, see logs:
Link to the documentation:
Issue:
Step 5: code versions_local.env
There is no "versions_local.env" anymore.
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/Prerequisites.md
Issue:
I set up a fresh IKS cluster on VPC.
I ran command:
sh scripts/ci-create-operators-kubernetes.sh database local reset
After a long time, the script looped on this message:
There are lots of unusual pods in the operators namespace:
deleeuw@uk.ibm.com@Adams-MacBook-Pro operator-database % kubectl get pods -n operators
NAME READY STATUS RESTARTS AGE
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb022n7j 0/1 Error 8 (5m14s ago) 19m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb0259fs 0/1 CrashLoopBackOff 9 (15s ago) 21m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb027v52 0/1 CrashLoopBackOff 8 (4m57s ago) 20m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02bqcr 0/1 Pending 0 10m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02cclp 0/1 Pending 0 4m14s
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02dr77 0/1 Pending 0 6m19s
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02h4d6 0/1 CrashLoopBackOff 8 (5m7s ago) 21m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02klbn 0/1 Pending 0 15m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02ldvp 0/1 Pending 0 5m34s
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02mdq5 0/1 Pending 0 7m46s
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02q5lz 0/1 CrashLoopBackOff 8 (36s ago) 18m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02t988 0/1 Pending 0 42s
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02wjnm 0/1 Pending 0 56s
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02wlsf 0/1 CrashLoopBackOff 8 (45s ago) 19m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02xf97 0/1 CrashLoopBackOff 7 (3m7s ago) 16m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb02zbv7 0/1 CrashLoopBackOff 7 (5m2s ago) 19m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb042lhm 0/1 Pending 0 8m6s
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb045jst 0/1 CrashLoopBackOff 9 (61s ago) 22m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb045np7 0/1 Pending 0 14m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb04bdjw 0/1 Pending 0 14m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb04c2tw 0/1 CrashLoopBackOff 7 (4m38s ago) 18m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb04d5zd 0/1 CrashLoopBackOff 9 (2m14s ago) 23m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb04flxq 0/1 CrashLoopBackOff 8 (2m15s ago) 20m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb04gmpz 0/1 CrashLoopBackOff 9 (42s ago) 21m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb04gqlj 0/1 CrashLoopBackOff 7 (3m11s ago) 17m
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb04gxmp 0/1 Pending 0 7m51s
775262e743cf8e28ee6c636a5acc820383ab64ca1201f7d87078bc5fb04hltg 0/1 CrashLoopBackOff 9 (15s ago) 21m
...
...
...
I truncated the output of the command as it was too long for this issue. There are actually 500+ pods running in the operators namespace
...
...
...
operator-database-catalog-6vw8c 1/1 Running 0 24m
operator-database-catalog-vgksd 1/1 Running 0 24m
Issue:
Error with Prometheus urlWhile executing go run main.go in Application scaler
Application scaler script consists of fixed prometheus url while deploying without OLM.
prometheusAddress=http://prometheus-operated.monitoring:9090/
It has to be http://localhost:9090/
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/operator-application-scaler/README.md
Issue:
Infinite loop running on install-everything-on-k8s-script.sh
Below is the error..!!
Status: Running
Running
2022-05-31 13:34:47 Status: operatorhubio-catalog(Running
Running)
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/Prerequisites.md
Issue:
In "Build and push new image" section;
podman push "$REGISTRY/$ORG/$IMAGE_DATABASE_OPERATOR"
occurs;
Error: error pushing image "docker.io/nheidloff/database-operator:v1.0.106": writing blob: initiating layer upload to /v2/nheidloff/database-operator/blobs/uploads/ in registry-1.docker.io: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/DbSetupWithoutOLM.md
Issue:
The sample DatabaseBackup CR specifies a cron job schedule of "*/3 * * * *" which is every 3 minutes. This is too frequent and ends up filling the COS instance with many buckets which makes it hard to navigate or delete. The frequency should be once per day.
The golden version of this file should be updated:
https://github.com/IBM/operator-sample-go/blob/main/operator-database/config/samples/database.sample_v1alpha1_databasebackup.yaml
This requires changing the associated template.
Link to the documentation:
Wrong template was used: 50266e4
Issue:
Error while executing Build and Publish new catalog image steps-DbOperator with OLM
sundeepbinaylalgolla@Sundeeps-MacBook-Pro operator-database % source ../versions_local.env
sundeepbinaylalgolla@Sundeeps-MacBook-Pro operator-database % ./bin/opm index add --build-tool podman --mode semver --tag "$REGISTRY/$ORG/$IMAGE_DATABASE_OPERATOR_CATALOG" --bundles "$REGISTRY/$ORG/$IMAGE_DATABASE_OPERATOR_BUNDLE"
zsh: no such file or directory: ./bin/opm
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/DbSetupWithOLM.md
Issue:
After Deleting everything with delete-everything-on-k8s-script still the install-everything-script is showing OLM is active
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/Prerequisites.md
Issue:
Using kubeconfig file: /Users/diwakartiwari/.kube/config
prometheusAddress=http://prometheus-operated.monitoring:9090
Error querying Prometheus: Post "http://prometheus-operated.monitoring:9090/api/v1/query": dial tcp: lookup prometheus-operated.monitoring: no such host
exit status 1
Link to the documentation:
Issue:
The documentation is partly wrong and we need to correct or delete that documentation.
Link to the documentation:
https://github.com/IBM/operator-sample-go/tree/main/operator-database-backup
Related issue: #74
Issue:
Step: Build and push new image
source ../versions_local.env
should be;
source ../versions.env
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/AppSetupWithoutOLM.md
Issue:
The 1st line says: sh scripts/check-prerequisites.sh
In step 2. Repo says clone the repo! If the repo is not cloned yet how can the user run the "check-prerequisites.sh"?
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/Prerequisites.md
Issue:
Get "http://database-cluster-0.database-service.database:8089/persons": dial tcp: lookup database-cluster-0.database-service.database: no such host
Link to the documentation:
https://github.com/IBM/operator-sample-go/tree/main/operator-database-backup
Issue:
In "Delete All resources" section;
kubectl delete -f config/samples/database.sample_v1alpha1_database.yaml
Returns:
Error from server (NotFound): error when deleting "config/samples/database.sample_v1alpha1_database.yaml": databases.database.sample.third.party "database" not found
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/DbSetupWithoutOLM.md
Issue:
Clean up of files doesn't work fully.
Remaining Catalog and Subscription yamls.
Issue:
The "sh scripts/check-binfiles-for-operator-sdk-projects.sh" should be "sh ../scripts/check-binfiles-for-operator-sdk-projects.sh"
The answer to the above script's prompts should somehow be easy to find (provided here: https://github.com/IBM/operator-sample-go/tree/main/scripts)
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/DbSetupWithOLM.md
and here;
https://github.com/IBM/operator-sample-go/tree/main/scripts
Issue:
In "Build and push new image" step;
podman push "$REGISTRY/$ORG/$IMAGE_APPLICATION_OPERATOR"
Results;
Error: error pushing image "docker.io/nheidloff/application-operator:v1.0.106": writing blob: initiating layer upload to /v2/nheidloff/application-operator/blobs/uploads/ in registry-1.docker.io: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
Link to the documentation:
https://github.com/IBM/operator-sample-go/issues/new?assignees=&labels=test_manual&template=issue-during-test.md&title=
Is this folder still needed?
Configuration for Kubernetes
Configuration for OpenShift
Folder:
https://github.com/IBM/operator-sample-go/tree/main/prometheus
Issue:
After setting up the demo environment with the scripts, the Application Scaler cron job is tested with command:
kubectl create job --from=cronjob/application-scaler manuallytriggered -n application-beta
However it fails with this error:
MountVolume.SetUp failed for volume "tokendata" : secret "prometheus-token-secret" not found.
It seems the script did not setup the secret described in the documentation linked below.
FYI, the associated secret prometheus-cert-secret was created successfully.
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/AppSetupWithOLM.md
When a user needs to place service credentials (e.g. COS) into a secret like operator-database-backup/kubernetes/secret.yaml
a good pattern is to use a template file, like cos-secret.template.yaml
and then have the user rename to cos-secret.yaml
after adding credentials. By adding cos-secret.yaml
to .gitignore
, there's less risk of having a commit/push expose the credential.
Issue:
ERROR:
————
While running the below steps:
$ kubectl create namespace database
$ kubectl apply -f config/samples/database.sample_v1alpha1_database.yaml
——>. $ kubectl apply -f config/samples/database.sample_v1alpha1_databasecluster
Got the below error:
Observation: .yaml extension is missing form the file name.
Resolution: Added .yaml extension to my local machine and the file is executed successfully.
Needs to append .yaml in the documentation of GitHub repository.
Warning:
—————
ERROR:
————-
While deploying Operator-application without OLM…
While executing the below command
$ make deploy IMG="$REGISTRY/$ORG/$IMAGE_APPLICATION_OPERATOR"
Observation: Cert-manager is missing.
Even though we are running operator withOut OLM, We need to run the script(Automation) scripts/install-required-kubernetes-components.sh, Which includes the installation of Cert-Manager, OLM,Prometheus.
It could be better to provide mannual commands to install only cert-manager.
Resolution: Ran scripts/install-required-kubernetes-components.sh For now.
After running the script…
It Went to the Infinite loop….
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/DbSetupWithoutOLM.md
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/Prerequisites.md
Issue:
Infinite loop running for operatorhubio-catalog in the installation script of k8s
Here is the debugged output:
sundeepbinaylalgolla@Sundeeps-MacBook-Pro operator-sample-go % kubectl get pods -n olm | grep operatorhubio-catalog
operatorhubio-catalog-f7q47 1/1 Running 0 9m34s
operatorhubio-catalog-xfv8c 1/1 Running 0 9m34s
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/Prerequisites.md
Issue:
According to the documentation the user should run;
kubectl apply -f config/samples/database.sample_v1alpha1_databasecluster
The following error is displayed;
error: the path "config/samples/database.sample_v1alpha1_databasecluster" does not exist
The .yaml extension is missing!
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/DbSetupWithoutOLM.md
For the demo, the setup steps describe that a Route should be manually created to help test the /hello endpoint from a browser. There should be a link out to another document to describe exactly how to do this, like we did for setting up COS.
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/demo.md
Issue:
In section "Delete all resources"
kubectl delete -f config/samples/database.sample_v1alpha1_databasecluster
should be:
kubectl delete -f config/samples/database.sample_v1alpha1_databasecluster.yaml
Link to the documentation:
https://github.com/IBM/operator-sample-go/blob/main/documentation/DbSetupWithoutOLM.md
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.