Skip to content

Commit

Permalink
feat: Delete legacy manifests generation approach
Browse files Browse the repository at this point in the history
Co-Authored-By: Alby Hernandez <[email protected]>
  • Loading branch information
sebastocorp and achetronic committed Jun 11, 2024
1 parent ca044a4 commit 23a576b
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 541 deletions.
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,11 @@ docker-buildx: test ## Build and push docker image for the manager for cross-pla
- docker buildx rm project-v3-builder
rm Dockerfile.cross

.PHONY: kustomization-build
kustomization-build: manifests kustomize kubectl-slice ## Generate the manifests to package them later in the way you want.
.PHONY: bundle-build
bundle-build: manifests kustomize ## Generate the manifests bundle to package them later in the way you want.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
rm -rf deploy/*
mkdir -p deploy
$(KUSTOMIZE) build config/default > deploy/manifests.yaml
$(KUBECTL_SLICE) --input-file=deploy/manifests.yaml --output-dir=deploy --template="{{.kind|lower}}/{{.metadata.name|dottodash}}.yaml"
@rm deploy/manifests.yaml || true
cd deploy && $(KUSTOMIZE) create --autodetect --recursive
$(KUSTOMIZE) build config/default > deploy/bundle.yaml

##@ Deployment

Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Replika

> **ATTENTION:** From v0.4.0+ bundled Kubernetes deployment manifests are built and uploaded to the releases.
> We do this to keep them atomic between versions. Due to this, `deploy` directory will be removed from repository.
> Please, read [related section](#deployment)
## Description
A Kubernetes operator to replicate a resource across namespaces

Expand Down Expand Up @@ -40,9 +44,11 @@ the tag of the version you want to deploy as follows:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/prosimcorp/replika//deploy/?ref=main
- https://github.com/prosimcorp/replika/releases/download/v0.4.0/bundle.yaml
```
> 🧚🏼 **Hey, listen! If you prefer to deploy using Helm, go to the [Helm registry](https://github.com/prosimcorp/helm-charts)**
## RBAC
We designed the operator to be able to replicate any kind of resource in a Kubernetes cluster, but by design, Kubernetes
Expand Down Expand Up @@ -88,7 +94,7 @@ subjects:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/prosimcorp/replika//deploy/?ref=main
- https://github.com/prosimcorp/replika/releases/download/v0.4.0/bundle.yaml

# Add your custom resources
- clusterRole-replika-custom-resources.yaml
Expand Down Expand Up @@ -193,7 +199,7 @@ the process, the steps are described in the following recipe:

```console
export VERSION="0.0.1"
export IMG="prosimcorp/replika:v$VERSION"
export IMG="ghcr.io/prosimcorp/replika:v$VERSION"
```

3. Generate and push the Docker image (published on Docker Hub).
Expand All @@ -205,7 +211,7 @@ the process, the steps are described in the following recipe:
4. Generate the manifests for deployments using Kustomize

```console
make kustomization-build
make bundle-build
```

## How to collaborate
Expand Down
57 changes: 0 additions & 57 deletions deploy/clusterrole/replika-manager-role.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions deploy/clusterrole/replika-metrics-reader.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions deploy/clusterrole/replika-proxy-role.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions deploy/clusterrolebinding/replika-manager-rolebinding.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions deploy/clusterrolebinding/replika-proxy-rolebinding.yaml

This file was deleted.

154 changes: 0 additions & 154 deletions deploy/customresourcedefinition/replikas-replika-prosimcorp-com.yaml

This file was deleted.

Loading

0 comments on commit 23a576b

Please sign in to comment.