A Controller written in kubernetes sample-controller style which watches a custom resource named Bookstore

Overview

bookstore-sample-controller

A Controller written in kubernetes sample-controller style which watches a custom resource named Bookstore. A resource create a deployment and a NodePort service. The container image is a simple bookstore api server. The NodePort service listen to request on host port 30000.

How to Use

Clone repo and move to directory

https://github.com/Shaad7/bookstore-sample-controller
cd bookstore-sample-controller

Create a kind cluster

kind create cluster --config=clusterconfig.yaml 

Create bookstores.gopher.com Custom Resource Definition (CRD)

kubectl apply -f artifacts/gopher.com_bookstore-status-subresource.yaml

Build and Run the controller

 go build -o bin/bookstore-controller .
 ./bin/bookstore-controller -kubeconfig=$HOME/.kube/config 

Create Custom Resource

kubectl apply -f artifacts/sample-bookstore.yaml 

Now the bookstore api server listens and serves to host port 30000. To get list of the books

curl http://localhost:30000

All the API calls from this list can be done on http://localhost:30000 instead of http://localhost:8081

You might also like...
Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a controlled manner.
Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a controlled manner.

TERRAFORM CONTROLLER Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a control

A kubernetes operator sample generated by kubebuilder , which run cmd in pod on specified time

init kubebuilder init --domain github.com --repo github.com/tonyshanc/sample-operator-v2 kubebuilder create api --group sample --version v1 --kind At

EdgeDB-Golang-Docker-Sample - The sample of connection between EdgeDB Server and Go Echo API Server

EdgeDB Golang Docker Sample 『Go + Docker Composeを使ってEdgeDBを動かしてみた』のサンプルコードです。 使い

Watches for zips and unzips them

unziploc Watches for zips/tars/rars and unzips them Options: PATHS = /data #Comma seperated list of paths to watch WRITE_DELAY = 1m #How long to wait

A long-running Go program that watches a Youtube playlist for new videos, and downloads them using yt-dlp or other preferred tool.

ytdlwatch A long-running Go program that watches a Youtube playlist for new videos, and downloads them using yt-dlp or other preferred tool. Ideal for

Ejemplo de un k8s custom controller para un CRD nuevo

Clonado de kubernetes/sample-controller Para pruebas de un CRD nuevo This repository implements a simple controller for watching Foo resources as defi

Develop sample controller step by step

Develop sample controller step by step

Knative Sample Controller

Knative Sample Controller Knative sample-controller defines a few simple resources that are validated by webhook and managed by a controller to demons

Owner
Abdullah Al Shaad
Software Engineer at AppsCode Inc
Abdullah Al Shaad
cluster-api-state-metrics (CASM) is a service that listens to the Kubernetes API server and generates metrics about the state of custom resource objects related of Kubernetes Cluster API.

Overview cluster-api-state-metrics (CASM) is a service that listens to the Kubernetes API server and generates metrics about the state of custom resou

Daimler Group 60 Aug 16, 2022
A kubernetes controller that watches the Deployments and “caches” the images

image-cloner This is just an exercise. It's a kubernetes controller that watches

Luca Sepe 1 Dec 20, 2021
A high performance online bookstore system.

HPOB 高性能网上书店 A high performance online bookstore system. Introduction 介绍 一个基于Gin、gorm、viper、zap等库的web服务器,实现了网上书店相关接口。 Summary 概要 使用go语言编写的,基于gin、gorm、

邹永赫 2 Apr 27, 2022
OpenDILab RL Kubernetes Custom Resource and Operator Lib

DI Orchestrator DI Orchestrator is designed to manage DI (Decision Intelligence) jobs using Kubernetes Custom Resource and Operator. Prerequisites A w

OpenDILab 123 Sep 27, 2022
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)

Terraform Provider for Azure (Resource Manager) Version 2.x of the AzureRM Provider requires Terraform 0.12.x and later, but 1.0 is recommended. Terra

null 0 Oct 16, 2021
Apachedist-resource - A concourse resource to track updates of an apache distribution, e.g. tomcat

Apache Distribution Resource A concourse resource that can track information abo

Gareth Evans 0 Feb 2, 2022
A kubernetes operator demo generated by code-generator, it only watches cr's events

intro a small operator demo which only watches car cr's events. environment: ubuntu-20.04-amd64 k3s-1.21 docker-20.10.7 go-1.17 tools code-generator d

shank 0 Dec 13, 2021
Crane (FinOps Crane) is an opensource project which manages cloud resource on Kubernetes stack, it is inspired by FinOps concepts.

Crane (FinOps Crane) is an opensource project which manages cloud resource on Kubernetes stack, it is inspired by FinOps concepts. Goal of Crane is to provide an one-stop shop project to help Kubernetes users to save cloud resource usage with a rich set of functionalities.

Crane 868 Sep 25, 2022
An operator which complements grafana-operator for custom features which are not feasible to be merged into core operator

Grafana Complementary Operator A grafana which complements grafana-operator for custom features which are not feasible to be merged into core operator

Snapp Cab Incubators 6 Aug 16, 2022
Image clone controller is a kubernetes controller to safe guard against the risk of container images disappearing

Image clone controller image clone controller is a kubernetes controller to safe guard against the risk of container images disappearing from public r

Jayadeep KM 0 Oct 10, 2021