application-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: 20 Imported by: 0

README

Go Report Card

Verrazzano Application Operator

Prerequisites

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

Build the Verrazzano application operator

  • To generate DeepCopy and DeepCopyInto methods for changes in types in APIs

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

    make manifests
    
  • 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 application 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
    
  • Run the operator with webhooks:

    • Run installer/scripts/4-install-vz-oam.sh to create build/webhook-certs
    • Run the operator with webhooks enabled:
      go run main.go --kubeconfig=${KUBECONFIG} --cert-dir=build/webhook-certs
      
    • Test the webhook endpoint:
      curl -X POST --insecure \
         https://localhost:9443/appconfig-defaulter \
         -H 'Content-Type: application/json' \
         -d @test/integ/testdata/hello-app_appconfig-defaulter-request.json
      
  • 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/
    
  • 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/
    
  • Uninstall the CRDs from the cluster:

    make uninstall-crds
    

Build and push Docker images

  • To build the Docker image:

    make docker-build
    
    
  • To push the Docker image:

    make docker-push
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
apis
app/v1alpha1
+groupName=app.verrazzano.io
+groupName=app.verrazzano.io
clusters/v1alpha1
+groupName=clusters.verrazzano.io
+groupName=clusters.verrazzano.io
oam/v1alpha1
+groupName=oam.verrazzano.io
+groupName=oam.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/app/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
versioned/typed/app/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
versioned/typed/clusters/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
versioned/typed/clusters/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
versioned/typed/oam/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
versioned/typed/oam/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
logging
Package logging is a generated GoMock package.
Package logging is a generated GoMock package.
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