operator

command module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 11 Imported by: 0

README

Operator

Release

Running the Operator

Requirements
  • kubectl (>= 1.20)
  • Kubernetes distribution such as kind.
Setup
  • Setup Kind with ingress controller enabled
```shell
cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    protocol: TCP
  - containerPort: 443
    hostPort: 443
    protocol: TCP
EOF
  • Setup Nginx ingress controller
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
  • Setup Cert-Manager
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.0/cert-manager.yaml
  • Edit email address in samples/cert-manager.yaml and apply configuration using the following command:
kubectl apply -f samples/cert-manager.yaml
  • Deploy the operator
kubectl apply -f https://raw.githubusercontent.com/ubogdan/operator/main/deploy/static/provider/kind/deploy.yaml

Setting up Your Development Environment

Requirements

Before you start, install the following tools and packages:

Get sources
git clone https://github.com/ubogdan/operator.git
cd operator
Setup
  • Setup Kind with ingress controller enabled
```shell
cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    protocol: TCP
  - containerPort: 443
    hostPort: 443
    protocol: TCP
EOF
  • Setup Nginx ingress controller
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
  • Setup Cert-Manager
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.0/cert-manager.yaml
  • Edit email address in samples/cert-manager.yaml and apply configuration using the following command:
kubectl apply -f samples/cert-manager.yaml
  • Run the operator (development mode)
```shell
make install run
  • Edit samples/workloads_v1_container.yaml and apply configuration using the following command:
kubectl apply -f samples/workloads_v1_container.yaml

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1
Package v1 contains API Schema definitions for the workloads v1 API group +kubebuilder:object:generate=true +groupName=workloads.operator.io
Package v1 contains API Schema definitions for the workloads v1 API group +kubebuilder:object:generate=true +groupName=workloads.operator.io

Jump to

Keyboard shortcuts

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