README
¶
Operator
Running the Operator
Requirements
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:
- go (>= 1.17)
- golangci-lint
- kubectl (>= 1.20)
- kubebuilder (>= 3.4.0)
- docker (>= 19.0.0)
- Kubernetes distribution such as kind.
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
Recommended reading
Documentation
¶
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 |
Click to show internal directories.
Click to hide internal directories.