generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add http transport metrics make webhooks optional * Delete README-FORK.md * add license header * remove linter findings in README * check for registered metrics on CF clients * use constants and update comments * write metrics to file (only for debugging) * check metrics >= 0 * metrics has to exist * add webhookCertDir --------- Co-authored-by: RalfHammer <119853077+RalfHammer@users.noreply.github.com>
- Loading branch information
1 parent
3d152c6
commit 501162d
Showing
6 changed files
with
272 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,34 @@ | ||
# Instructions for local development | ||
|
||
Prerequisite: K8s cluster (kind, minikube) with cert-manager installed. | ||
**Prerequisites**: K8s cluster (kind, minikube) with cert-manager installed. | ||
|
||
1. Deploy custom resource definnitions: | ||
|
||
```bash | ||
kubectl apply -f crds | ||
``` | ||
|
||
2. Deploy webhook definitions and according objects: | ||
2. Copy a sufficently authorized kubeconfig to `.kubeconfig` in the root folder of this repository, e.g.: | ||
|
||
```bash | ||
cp ~/.kube/config .kubeconfig | ||
``` | ||
|
||
Afterwards (if using vscode) it should be possible to start the operator with the included launch configuration. | ||
|
||
Optional, if you want to test the webhook locally: | ||
|
||
1. Deploy webhook definitions and according objects: | ||
|
||
```bash | ||
# replace HOST_IP below with a non-loopback interface address of your desktop | ||
HOST_IP=1.2.3.4 envsubst < .local/k8s-resources.yaml | kubectl apply -f - | ||
``` | ||
|
||
3. Extract the TLS server keypair: | ||
2. Extract the TLS server keypair: | ||
|
||
```bash | ||
.local/getcerts.sh | ||
``` | ||
|
||
4. Copy a sufficently authorized kubeconfig to `.kubeconfig` in the root folder of this repository. | ||
|
||
Afterwards (if using vscode) it should be possible to start the operator with the included launch configuration. | ||
3. in .vscode/launch.json, set `--enableWebhook=true` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.