inferator

command module
v0.0.0-...-8ee8a0f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

Inferator

Go Report

Requirements

  • go 1.13.x
  • operator-sdk 0.12.0

Build

make

Upload to a container registry

e.g.

docker push quay.io/tchughesiv/inferator:<version>

Deploy to OpenShift 4 using OLM

To install this operator on OpenShift 4 for end-to-end testing, make sure you have access to a quay.io account to create an application repository. Follow the authentication instructions for Operator Courier to obtain an account token. This token is in the form of "basic XXXXXXXXX" and both words are required for the command.

Push the operator bundle to your quay application repository as follows:

REGISTRY_NS=<registry namespace in quay.io>
operator-courier push deploy/catalog_resources/community ${REGISTRY_NS} inferator-operator $(go run getversion.go -operator) "basic XXXXXXXXX"

Note that the push command does not overwrite an existing repository, and it needs to be deleted before a new version can be built and uploaded. Once the bundle has been uploaded, create an Operator Source to load your operator bundle in OpenShift.

oc create -f - <<EOF
apiVersion: operators.coreos.com/v1
kind: OperatorSource
metadata:
  name: inferator-operators
  namespace: openshift-marketplace
spec:
  type: appregistry
  endpoint: https://quay.io/cnr
  registryNamespace: ${REGISTRY_NS}
  displayName: "Inferator Operators"
  publisher: "Red Hat"
EOF

Development

Change log level at runtime w/ the DEBUG environment variable. e.g. -

make vet
DEBUG="true" operator-sdk up local --namespace=<namespace>

Also at runtime, change registry for rhpam ImageStreamTags -

INSECURE=true REGISTRY=<registry url> operator-sdk up local --namespace=<namespace>

Before submitting PR, please be sure to generate, vet, format, and test your code. This all can be done with one command.

make test

Test zenithr

curl -v http://example-operationrule-tommy4.apps-crc.testing/ \
 -H "Content-Type: application/json" \
 --data-binary "@test/deployment-replicas1.json" | jq

curl -v http://example-operationrule-tommy4.apps-crc.testing/ \
 -H "Content-Type: application/json" \
 --data-binary "@test/deployment-replicas3.json" | jq

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
pkg
apis/rule
Package rule contains rule API versions.
Package rule contains rule API versions.
apis/rule/v1alpha1
Package v1alpha1 contains API Schema definitions for the rule v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=rule.example.com Package v1alpha1 contains API Schema definitions for the rule v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=rule.example.com
Package v1alpha1 contains API Schema definitions for the rule v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=rule.example.com Package v1alpha1 contains API Schema definitions for the rule v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=rule.example.com
tools

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL