example

command module
v0.0.0-...-0bcaffd Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

README

This example project implements a controller for ConfigMapCount CRD, which looks like this:

apiVersion: silly.example.org/v1alpha1
kind: ConfigMapCount
metadata:
  name: configmapcount-sample
  namespace: default
status:
  configMaps: 3

This ((not) very useful) API object counts ConfigMaps in the same namespace and puts the count into its .status.configMaps field.

Pre-requisites

Have your Kubernetes cluster ready. One great option is kind:

Build and Install

If you made any changes to API types, you need to generate Go and CRD YAML code:

make generate

To install the CRDs into your Kubernetes cluster:

make install

Run the controller

Run against the configured Kubernetes cluster in ~/.kube/config

make run

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the silly v1alpha1 API group +kubebuilder:object:generate=true +groupName=silly.example.org
Package v1alpha1 contains API Schema definitions for the silly v1alpha1 API group +kubebuilder:object:generate=true +groupName=silly.example.org

Jump to

Keyboard shortcuts

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