memcached-operator

module
v0.0.0-...-b140147 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0

README

Memcached Ansible Operator

Overview

This Memcached operator is a simple example operator for the Operator SDK and includes some basic end-to-end tests.

Prerequisites

Getting Started

Cloning the repository

Checkout this Memcached Operator repository

$ mkdir $GOPATH/src/github.com/99cloud
$ cd $GOPATH/src/github.com/99cloud
$ git clone https://github.com/99cloud/operator-sdk-samples.git
$ cd operator-sdk-samples/memcached-operator
$ git checkout animbus-v3.11
Pulling the dependencies

Run the following command

$ go mod tidy
Building the operator

Build the Memcached operator image and push it to a public registry, such as quay.io:

$ export IMAGE=quay.io/example-inc/memcached-operator:v0.0.1
$ operator-sdk build $IMAGE
$ docker push $IMAGE
Using the image
# Update the operator manifest to use the built image name (if you are performing these steps on OSX, see note below)
$ sed -i 's|REPLACE_IMAGE|quay.io/example-inc/memcached-operator|g' deploy/operator.yaml
# On OSX use:
$ sed -i "" 's|REPLACE_IMAGE|quay.io/example-inc/memcached-operator|g' deploy/operator.yaml

NOTE The quay.io/example-inc/memcached-operator is an example. You should build and push the image for your repository.

Installing

Run make install to install the operator. Check that the operator is running in the cluster, also check that the example Memcached service was deployed.

Uninstalling

To uninstall all that was performed in the above step run make uninstall.

Run Tests

Run make test-e2e to run the integration e2e tests with different options. For more information see the writing e2e tests guide.

Directories

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

Jump to

Keyboard shortcuts

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