Skip to content

Commit e8a4ab1

Browse files
Merge pull request #30 from bharath-b-rh/eso-83
ESO-83: Adds API reference guide and make target for generating it
2 parents a9ccfc7 + 93141dd commit e8a4ab1

File tree

152 files changed

+26596
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+26596
-21
lines changed

Makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ build: manifests generate fmt vet build-operator ## Build manager binary.
158158

159159
.PHONY: run
160160
run: manifests generate fmt vet ## Run a controller from your host.
161-
go run ./cmd/external-secrets-operator/main.go
161+
go run ./cmd/external-secrets-operator/main.go --v=5
162162

163163
# If you wish to build the manager image targeting other platforms you can use the --platform flag.
164164
# (i.e. docker build --platform linux/arm64). However, you must enable docker buildKit for it.
@@ -232,6 +232,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
232232
GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
233233
YQ = $(LOCALBIN)/yq
234234
HELM ?= $(LOCALBIN)/helm
235+
REFERENCE_DOC_GENERATOR ?= $(LOCALBIN)/crd-ref-docs
235236

236237
## Tool Versions
237238
YQ_VERSION = v4.45.2
@@ -257,6 +258,10 @@ golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
257258
$(GOLANGCI_LINT): $(LOCALBIN)
258259
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint)
259260

261+
.PHONY: crd-ref-docs
262+
crd-ref-docs: $(LOCALBIN) ## Download crd-ref-docs locally if necessary.
263+
$(call go-install-tool,$(REFERENCE_DOC_GENERATOR),github.com/elastic/crd-ref-docs)
264+
260265
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
261266
# $1 - target path with name of binary
262267
# $2 - package url which can be installed
@@ -369,9 +374,14 @@ verify: vet fmt golangci-lint verify-bindata verify-bindata-assets verify-genera
369374

370375
## update the relevant data based on new changes.
371376
.PHONY: update
372-
update: generate manifests update-operand-manifests update-bindata
377+
update: generate manifests update-operand-manifests update-bindata bundle docs
373378

374379
## checks for any uncommitted changes.
375380
.PHONY: check-git-diff
376-
check-git-diff: manifests generate update-operand-manifests bundle
381+
check-git-diff: update
377382
./hack/check-git-diff-clean.sh
383+
384+
## generate internal docs.
385+
.PHONY: docs
386+
docs: crd-ref-docs
387+
$(REFERENCE_DOC_GENERATOR) --source-path=api/v1alpha1/ --renderer=markdown --config=hack/docs/config.yaml --output-path=docs/api_reference.md

README.md

Lines changed: 58 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,61 @@
1-
# external-secrets-operator for OpenShift
1+
# external-secrets-operator for Red Hat OpenShift
2+
This repository contains External Secrets Operator for Red Hat OpenShift. The operator runs in `external-secrets-operator` namespace.
3+
The External Secrets Operator provides the ability to deploy [`external-secrets`](https://github.com/openshift/external-secrets) using different configurations
24

3-
This repository contains External Secrets Operator designed for OpenShift. The operator runs in `external-secrets-operator` namespace.
4-
5-
The operator based on operator-sdk framework to install external-secrets operator helm chart from https://github.com/openshift/external-secrets
5+
The External Secrets Operator for Red Hat OpenShift operates as a cluster-wide service to deploy and manage the external-secrets
6+
application. The external-secrets application integrates with external secrets management systems and performs secret fetching,
7+
refreshing, and provisioning within the cluster.
68

79
## Description
8-
// TODO(user): An in-depth paragraph about your project and overview of use
10+
Use the External Secrets Operator for Red Hat OpenShift to integrate external-secrets application with the
11+
OpenShift Container Platform cluster. The external-secrets application fetches secrets stored in the external providers such as
12+
AWS Secrets Manager, HashiCorp Vault, Google Secrets Manager, Azure Key Vault, IBM Cloud Secrets Manager,
13+
AWS Systems Manager Parameter Store and integrates them with Kubernetes in a secure manner.
14+
15+
Using the External Secrets Operator ensures the following:
16+
- Decouples applications from the secret-lifecycle management.
17+
- Centralizes secret storage to support compliance requirements.
18+
- Enables secure and automated secret rotation.
19+
- Supports multi-cloud secret sourcing with fine-grained access control.
20+
- Centralizes and audits access control.
21+
22+
The External Secrets Operator for Red Hat OpenShift uses the [`external-secrets`](https://github.com/openshift/external-secrets) helm charts
23+
to install application. The operator has three controllers to achieve the same:
24+
- `external_secrets_manager` controller: This is responsible for
25+
* reconciling the `externalsecretsmanagers.openshift.operator.io` resource.
26+
* providing the status of other controllers.
27+
- `external_secrets` controller: This is responsible for
28+
* reconciling the `externalsecrets.openshift.operator.io` resource.
29+
* installing and managing the `external-secrets` application based on the user defined configurations in `externalsecrets.openshift.operator.io` resource.
30+
* reconciling the `externalsecretsmanagers.openshift.operator.io` resource for the global configurations and updates the `external-scerets` deployment accordingly.
31+
- `crd_annotator` controller:
32+
* This is responsible for adding `cert-manager.io/inject-ca-from` annotation in the `external-secrets` provided CRDs.
33+
* This is an optional controller, which will be activated only when [`cert-manager`](https://cert-manager.io/) is installed.
34+
* When `cert-manager` is installed after External Secrets Operator installation, `external-secrets-operator-controller-manager` deployment must be restarted to activate the controller.
35+
36+
The operator automatically creates a cluster-scoped `externalsecretsmanagers.openshift.operator.io` object named `cluster`.
37+
38+
For more information about
39+
- `external-secrets-operator for Red Hat OpenShift`, refer to the [link](https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/security_and_compliance/external-secrets-operator-for-red-hat-openshift)
40+
- `external-secrets` application, refer to the [link](https://external-secrets.io/latest/).
41+
- `cert-manager Operator for Red Hat OpenShift`, refer to the [link](https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/security_and_compliance/cert-manager-operator-for-red-hat-openshift)
942

1043
## Getting Started
1144

1245
### Prerequisites
13-
- go version v1.22.0+
46+
- go version 1.23.6+
1447
- docker version 17.03+.
15-
- kubectl version v1.11.3+.
16-
- Access to a Kubernetes v1.11.3+ cluster.
48+
- kubectl version v1.32.1+.
49+
- Access to a Kubernetes v1.32.1+ cluster.
1750

1851
### To Deploy on the cluster
1952
**Build and push your image to the location specified by `IMG`:**
2053

2154
```sh
22-
make docker-build docker-push IMG=<some-registry>/external-secrets-operator:tag
55+
make docker-build docker-push IMG=<some-registry>/external-secrets-operator:<tag>
2356
```
2457

25-
**NOTE:** This image ought to be published in the personal registry you specified.
58+
> **NOTE:** This image ought to be published in the personal registry you specified.
2659
And it is required to have access to pull the image from the working environment.
2760
Make sure you have the proper permission to the registry if the above commands don’t work.
2861

@@ -35,10 +68,10 @@ make install
3568
**Deploy the Manager to the cluster with the image specified by `IMG`:**
3669

3770
```sh
38-
make deploy IMG=<some-registry>/external-secrets-operator:tag
71+
make deploy IMG=<some-registry>/external-secrets-operator:<tag>
3972
```
4073

41-
> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin
74+
> **NOTE:** If you encounter RBAC errors, you may need to grant yourself cluster-admin
4275
privileges or be logged in as admin.
4376

4477
**Create instances of your solution**
@@ -48,7 +81,7 @@ You can apply the samples (examples) from the config/sample:
4881
kubectl apply -k config/samples/
4982
```
5083

51-
>**NOTE**: Ensure that the samples has default values to test it out.
84+
> **NOTE:** Ensure that the samples has default values to test it out.
5285
5386
### To Uninstall
5487
**Delete the instances (CRs) from the cluster:**
@@ -79,7 +112,7 @@ Following are the steps to build the installer and distribute this project to us
79112
make build-installer IMG=<some-registry>/external-secrets-operator:tag
80113
```
81114

82-
NOTE: The makefile target mentioned above generates an 'install.yaml'
115+
> **NOTE:** The makefile target mentioned above generates an 'install.yaml'
83116
file in the dist directory. This file contains all the resources built
84117
with Kustomize, which are necessary to install this project without
85118
its dependencies.
@@ -92,12 +125,20 @@ Users can just run kubectl apply -f <URL for YAML BUNDLE> to install the project
92125
kubectl apply -f https://raw.githubusercontent.com/<org>/external-secrets-operator/<tag or branch>/dist/install.yaml
93126
```
94127

128+
> **NOTE:** Run `make help` for more information on all potential `make` targets
129+
130+
More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
131+
95132
## Contributing
96-
// TODO(user): Add detailed information on how you would like others to contribute to this project
133+
We welcome contributions from the community! To contribute:
97134

98-
**NOTE:** Run `make help` for more information on all potential `make` targets
135+
- Fork this repository and create a new branch.
136+
- Make your changes and test them thoroughly.
137+
- Run make targets to verify the behavior.
138+
- Submit a Pull Request describing your changes and the motivation behind them.
139+
- Run make help to view all available development targets.
99140

100-
More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
141+
We appreciate issues, bug reports, feature requests, and feedback!
101142

102143
## License
103144

0 commit comments

Comments
 (0)