platform-operator

command
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: UPL-1.0 Imports: 28 Imported by: 0

README

Go Report Card

Verrazzano Platform Operator

Instructions for building and testing the Verrazzano platform operator.

Prerequisites

  • kustomize v3.1.0+
  • kubebuilder 2.3.1+
  • go version v1.15.7
  • Docker
  • kubectl

Build and install Verrazzano

To build and then install Verrazzano using the Verrazzano platform operator:

# Create the verrazzano-platform-operator image.  For now, the image needs public access.
# Replace <docker-repository> and <namespace for image>.
$ export DOCKER_REPO=<docker-repository>
$ export DOCKER_NAMESPACE=<namespace for image>
$ make docker-push

# Create the verrrazzano-platform-operator deployment YAML file.
# Define the VZ_DEV_IMAGE env variable and call the create-test-deploy target
# - Replace <verrazzano-image> with the verrazzano-platform-operator image you created with `make docker-push`
# - Creates a valid deployment YAML file in build/deploy/operator.yaml
$ export VZ_DEV_IMAGE=<verrazzano-image>
$ make create-test-deploy

# Deploy the verrazzano-platform-operator
$ kubectl apply -f build/deploy/operator.yaml

# Verify verrazzano-platform-operator pod is running
$ kubectl get pods -n verrazzano-install

# Initiate a Verrazzano install for nip.io
$ kubectl apply -f config/samples/install-default.yaml

# NOTE:  If you chose to deploy a cluster that makes use of OCI DNS perform the following instead of the nip.io
# cluster deployment command:

# Generate a secret named "oci" based on the OCI configuration profile you wish to leverage.  You
# can specify a profile other than DEFAULT and a different secret name if you wish.  See instruction by running
# ./scripts/install/create_oci_config_secret.sh
$ ./scripts/install/create_oci_config_secret.sh

# Copy the config/samples/install-oci.yaml file
$ cp config/samples/install-oci.yaml /tmp

# Edit the file and provide the DNS ZONE name, OCID, and compartment OCID, and secret name

# Monitor the install
$ kubectl logs -f $(kubectl get pod -l job-name=verrazzano-install-my-verrazzano -o jsonpath="{.items[0].metadata.name}")

# Wait for the Verrazzano install to complete
$ kubectl wait --timeout=20m --for=condition=InstallComplete verrazzano/my-verrazzano

To uninstall Verrazzano using the Verrazzano platform operator:

# Initiate a Verrazzano uninstall
$ kubectl delete -f config/samples/install-default.yaml

# Monitor the uninstall
$ kubectl logs -f $(kubectl get pod -l job-name=verrazzano-uninstall-my-verrazzano -o jsonpath="{.items[0].metadata.name}")

Build the Verrazzano platform operator

  • To generate manifests (for example, CRD, RBAC, and such):

    $ make manifests
    
  • To generate code (for example, zz_generated.deepcopy.go):

    $ make generate
    
  • To do all the source code checks, such as fmt, lint, and such:

    $ make check
    
  • To build the operator and generated code:

    $ make go-install
    

Test the Verrazzano platform operator

You need a Kubernetes cluster to run against.

  • Install the CRDs into the cluster:

    $ make install-crds
    
  • Run the operator. This will run in the foreground, so switch to a new terminal if you want to leave it running.

    $ make run
    
  • Create a custom resource. You will notice that messages are logged to the operator when the custom resource is applied.

    $ kubectl apply -f config/samples/install-default.yaml
    
  • Delete the custom resource. You will notice that messages are logged to the operator when the custom resource is deleted.

    $ kubectl delete -f config/samples/install-default.yaml
    
  • Uninstall the CRDs from the cluster:

    $ make uninstall-crds
    

Build and push Docker images

  • To build the Docker image:
    $ make docker-build
    
  • To build and push the Docker image:
    $ make docker-push
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
apis
verrazzano/v1alpha1
+groupGoName=Verrazzano +groupName=install.verrazzano.io
+groupGoName=Verrazzano +groupName=install.verrazzano.io
verrazzano/v1beta1
+groupGoName=Verrazzano +groupName=install.verrazzano.io
+groupGoName=Verrazzano +groupName=install.verrazzano.io
clientset
versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
versioned/typed/verrazzano/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
versioned/typed/verrazzano/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
versioned/typed/verrazzano/v1beta1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
versioned/typed/verrazzano/v1beta1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
experimental
internal
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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