Skip to content

Latest commit

 

History

History
 
 

operator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

This README is currently targeted to developers only and only discusses using the Makefile.

Build the Operator

The operator isn’t on Docker Hub or Quay.io yet, so you need to build it to get the image on your machine:

make operator-build

Deploy the Operator (and optionally Kiali)

To install the Kiali operator to either an OpenShift or Kubernetes cluster:

make operator-create

This will deploy the Kiali operator to the "kiali-operator" namespace. It can also deploy Kiali if you wish by running:

OPERATOR_INSTALL_KIALI=true make operator-create

When you tell it to install Kiali, you will not be prompted for authentication credentials - the Makefile will default to using the OpenShift OAuth authentication strategy if on OpenShift, and will default to using username/passphrase of admin/admin if on Kubernetes.

This make target runs the install script. For documentation on all available settings it supports, see the comments at the top of that script. You may have to edit the Makefile target if you want to pass additional settings to the script.

Remove the Operator

You can remove the operator by running the operator-delete target:

make operator-delete

Once removed, the kiali-create and kiali-delete targets will be ineffective. You can still use the Ansible playbook to install Kiali or the purge-kiali target to remove Kiali.

Deploy Kiali

To install Kiali when an operator already is installed, you can edit the Kiali Custom Resource YAML (the "CR") (or leave it as-is to pick up the defaults) and then run:

make kiali-create

For documentation on all available settings, see this Kiali CR file.

Remove Kiali

To tell the operator to remove Kiali (i.e. uninstall Kiali), run:

make kiali-delete

Purge Kiali

Sometimes when developing and testing Ansible tasks, you want to start cleanly with no Kiali resources in your cluster. To quickly purge your cluster of Kiali resources (e.g. the deployment, the service account, etc), run the purge-kiali target:

make purge-kiali

Run Ansible locally

You can test the Ansible tasks locally by running the dev-playbook. This allows you to test the Ansible tasks without having to rebuild and redeploy the operator. By running the Ansible playbook locally, you can install Kiali directly into your cluster using the Ansible tasks without going through the operator.

Edit the dev-playbook.yml to configure what role you want to run and what variables you want to pass in. This simulates the values within the Kiali CR.

make run-playbook

For developers who want to test specific tasks, you can temporarily add "tags: test" to your tasks and then run the run-playbook-tag target which will run only those tasks you tagged.

NOTES

  • You can create and delete the Kiali secret separately through the make targets secret-create and secret-delete.

  • The skeleton for this project was created via:

operator-sdk new kiali-operator --api-version=kiali.io/v1alpha1 --kind=Kiali --type=ansible --skip-git-init