https://github.com/vishalanarase/memcached-operator
Kubernetes operator for management of Memcached clusters. Implement the admission webhooks for validating and mutating.
https://github.com/vishalanarase/memcached-operator
admission-webhooks golang kubernetes kubernetes-operator mutation-webhook validation-webhook webhook
Last synced: 8 days ago
JSON representation
Kubernetes operator for management of Memcached clusters. Implement the admission webhooks for validating and mutating.
- Host: GitHub
- URL: https://github.com/vishalanarase/memcached-operator
- Owner: vishalanarase
- License: apache-2.0
- Created: 2025-03-01T10:16:02.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-19T13:29:57.000Z (10 months ago)
- Last Synced: 2025-08-19T15:31:20.947Z (10 months ago)
- Topics: admission-webhooks, golang, kubernetes, kubernetes-operator, mutation-webhook, validation-webhook, webhook
- Language: Go
- Homepage:
- Size: 12 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π **Memcached Operator**
> This project implements a Kubernetes operator for managing Memcached instances. The operator automates the deployment, scaling, and management of Memcached clusters in a Kubernetes environment. It leverages the Operator SDK to create admission webhooks for validating and mutating custom resources.

## π **Table of Contents**
- [Project Structure](#project-structure)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Kind Cluster Setup](#kind-cluster-setup)
- [Docker Build and Push](#docker-build-and-push)
- [Deploying the Operator](#deploying-the-operator)
- [Testing](#testing-the-operator)
- [Usage](#usage)
- [Contributing](#contributing)
- [Code of Conduct](#code-of-conduct)
- [License](#license)
- [Please Star the Repo](#please-star-the-repo)
---
## ποΈ **Project Structure**
- **Dockerfile, Makefile, README.md**: Project build, configuration, and documentation files. π οΈ
- **LICENSE**: License file for the project. π
- **PROJECT**: The project-specific metadata and configuration details. π
- **api**: Defines the custom resources, types, and webhooks for the operator.
- **bin**: Contains compiled binaries and tools for the operator.
- **cmd**: Main application entry point for starting the operator.
- **config**: Kubernetes and operator configurations.
- **docs**: Documentation related to the operator.
- **go.mod, go.sum**: Go module definition files for managing dependencies.
- **hack**: Helper scripts or files for project setup or boilerplate code.
- **internal**: Internal logic for the operator.
- **test**: Tests for the operator.
---
## π **Getting Started**
### π **Prerequisites**
Before you start, make sure you have the following tools installed:
- **Kind** π οΈ
- **Docker** π³
- **kubectl** π
- **kustomize** π§©
- **Go** (for development) π₯οΈ
### π **Kind Cluster Setup**
1. **Kind cluster configuration**:
```yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.32.2
- role: worker
image: kindest/node:v1.32.2
- role: worker
image: kindest/node:v1.32.2
```
2. **Apply the cluster configuration**:
```bash
kind create cluster --config kind.yaml
```
Follow the [instructions](docs/certs.md) to generate the necessary certificates for the operator.
### ποΈ **Docker Build and Push**
Build and push the operator image to your Docker registry
### π **Deploying the Operator**
```bash
make deploy
```
### π§ͺ **Testing the Operator**
Test the operator by creating a Memcached custom resource:
```bash
kubectl apply -f manifests/examples/memcached-cr.yaml
```
### π§Ή **Cleanup**
To clean up:
```bash
make undeploy
kind delete cluster
```
---
## π οΈ **Usage**
The operator manages the lifecycle of Memcached resources. It ensures that the desired state (such as number of replicas and configuration) for Memcached instances is maintained. The operator will:
- Deploy Memcached resources based on custom resources.
- Automatically scale Memcached instances.
- Monitor the health of Memcached instances.
---
## πββοΈ **Contributing**
Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.
---
## π§βπ€βπ§ **Code of Conduct**
This project and everyone participating in it is governed by the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/). By participating, you are expected to uphold this code. Please report unacceptable behavior to the project team.
The goal of this code of conduct is to ensure a welcoming, respectful, and productive environment for all contributors. The expectations are:
- **Be respectful**: Treat everyone with kindness and empathy.
- **Be inclusive**: Embrace diversity of thought, background, and perspective.
- **Be responsible**: Take ownership of your contributions and interactions.
- **Be collaborative**: Foster a cooperative environment where knowledge sharing is encouraged.
For more details, please refer to the full [Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
---
## π **License**
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
---
## β **Please Star the Repo**
If you find this project useful, please consider giving it a βοΈ on GitHub. Your star helps us reach more developers and contributors and supports the continued improvement of the project. Itβs a great way to show appreciation! π