Kubernetes Operator that creates Service Endpoints from Secrets
1# secret-service-operator 😎
2
3Create Service Endpoints based on Secrets
4
5## Description
6
7This is designed to be used in tandom with a secrets manager.
8It allows you to specify an endpoint IP and port via a secret, and convert that into a service endpoint.
9
10## Getting Started
11
12### Prerequisites
13- go version v1.22.0+
14- docker version 17.03+.
15- kubectl version v1.11.3+.
16- Access to a Kubernetes v1.11.3+ cluster.
17
18### To Deploy on the cluster
19**Build and push your image to the location specified by `IMG`:**
20
21```sh
22make docker-build docker-push IMG=<some-registry>/secret-service-operator:tag
23```
24
25**NOTE:** This image ought to be published in the personal registry you specified.
26And it is required to have access to pull the image from the working environment.
27Make sure you have the proper permission to the registry if the above commands don’t work.
28
29**Install the CRDs into the cluster:**
30
31```sh
32make install
33```
34
35**Deploy the Manager to the cluster with the image specified by `IMG`:**
36
37```sh
38make deploy IMG=<some-registry>/secret-service-operator:tag
39```
40
41> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin
42privileges or be logged in as admin.
43
44**Create instances of your solution**
45You can apply the samples (examples) from the config/sample:
46
47```sh
48kubectl apply -k config/samples/
49```
50
51>**NOTE**: Ensure that the samples has default values to test it out.
52
53### To Uninstall
54**Delete the instances (CRs) from the cluster:**
55
56```sh
57kubectl delete -k config/samples/
58```
59
60**Delete the APIs(CRDs) from the cluster:**
61
62```sh
63make uninstall
64```
65
66**UnDeploy the controller from the cluster:**
67
68```sh
69make undeploy
70```
71
72## Project Distribution
73
74Following are the steps to build the installer and distribute this project to users.
75
761. Build the installer for the image built and published in the registry:
77
78```sh
79make build-installer IMG=<some-registry>/secret-service-operator:tag
80```
81
82NOTE: The makefile target mentioned above generates an 'install.yaml'
83file in the dist directory. This file contains all the resources built
84with Kustomize, which are necessary to install this project without
85its dependencies.
86
872. Using the installer
88
89Users can just run kubectl apply -f <URL for YAML BUNDLE> to install the project, i.e.:
90
91```sh
92kubectl apply -f https://raw.githubusercontent.com/<org>/secret-service-operator/<tag or branch>/dist/install.yaml
93```
94
95## Contributing
96// TODO(user): Add detailed information on how you would like others to contribute to this project
97
98**NOTE:** Run `make help` for more information on all potential `make` targets
99
100More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
101
102## License
103
104Copyright 2025.
105
106Licensed under the Apache License, Version 2.0 (the "License");
107you may not use this file except in compliance with the License.
108You may obtain a copy of the License at
109
110 http://www.apache.org/licenses/LICENSE-2.0
111
112Unless required by applicable law or agreed to in writing, software
113distributed under the License is distributed on an "AS IS" BASIS,
114WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
115See the License for the specific language governing permissions and
116limitations under the License.
117