subscription-validator-webhook
所属分类:构建工具
开发工具:HTML
文件大小:0KB
下载次数:0
上传日期:2023-03-27 14:47:32
上 传 者:
sh-1993
说明: 订阅验证器webhook,,
(subscription-validator-webhook,,)
文件列表:
.dockerignore (75, 2023-03-27)
.mvn/ (0, 2023-03-27)
.mvn/wrapper/ (0, 2023-03-27)
.mvn/wrapper/MavenWrapperDownloader.java (5433, 2023-03-27)
.mvn/wrapper/maven-wrapper.properties (1018, 2023-03-27)
chart/ (0, 2023-03-27)
chart/Chart.yaml (1170, 2023-03-27)
chart/templates/ (0, 2023-03-27)
chart/templates/_helpers.tpl (1032, 2023-03-27)
chart/templates/configmap.yaml (257, 2023-03-27)
chart/templates/deployment.yaml (1906, 2023-03-27)
chart/templates/service.yaml (362, 2023-03-27)
chart/templates/validating-webhook.yaml (723, 2023-03-27)
chart/values.yaml (306, 2023-03-27)
mvnw (10284, 2023-03-27)
mvnw.cmd (6734, 2023-03-27)
pom.xml (5117, 2023-03-27)
src/ (0, 2023-03-27)
src/main/ (0, 2023-03-27)
src/main/docker/ (0, 2023-03-27)
src/main/docker/Dockerfile.jvm (5273, 2023-03-27)
src/main/docker/Dockerfile.legacy-jar (5082, 2023-03-27)
src/main/docker/Dockerfile.native (721, 2023-03-27)
src/main/docker/Dockerfile.native-micro (946, 2023-03-27)
src/main/java/ (0, 2023-03-27)
src/main/java/com/ (0, 2023-03-27)
src/main/java/com/example/ (0, 2023-03-27)
src/main/java/com/example/admission/ (0, 2023-03-27)
src/main/java/com/example/admission/AdmissionReviewMessageBodyReader.java (1331, 2023-03-27)
src/main/java/com/example/admission/ValidatingAdmissionController.java (4119, 2023-03-27)
src/main/resources/ (0, 2023-03-27)
src/main/resources/META-INF/ (0, 2023-03-27)
src/main/resources/META-INF/resources/ (0, 2023-03-27)
src/main/resources/META-INF/resources/index.html (245481, 2023-03-27)
src/main/resources/application.properties (199, 2023-03-27)
src/test/ (0, 2023-03-27)
src/test/java/ (0, 2023-03-27)
... ...
# subscription-validator-webhook
This is an example of a [Validating Admission Plugin](https://docs.openshift.com/container-platform/4.12/architecture/admission-plug-ins) to validate subscriptions for certain operators against a list of channels that you want to allow subscriptions against.
## How to Build and Deploy
The webhook is written in Quarkus. There are a few ways to build and deploy Quarkus apps. The approach below uses Quarkus plugins to build the container image, followed by a Helm chart to deploy and configure the Validating Webhook. The Helm chart approach is used for deployment to more easily add a serving certificate (admission webhook must have TLS) and map in config for the webhook.
### Build the Container Image
To build the webhook as a JVM image:
```shell script
./mvnw clean package -Dquarkus.container-image.build=true [-Dquarkus.kubernetes-client.trust-certs=true]
```
### Deploy and Configure the Webhook
To deploy the webhook image and configure the Validating Webhook:
```shell script
helm install ./chart
```
## === Standard Quarkus generated README below ===
This project uses Quarkus, the Supersonic Subatomic Java Framework.
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
## Running the application in dev mode
You can run your application in dev mode that enables live coding using:
```shell script
./mvnw compile quarkus:dev
```
> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
## Packaging and running the application
The application can be packaged using:
```shell script
./mvnw package
```
It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.
The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.
If you want to build an _über-jar_, execute the following command:
```shell script
./mvnw package -Dquarkus.package.type=uber-jar
```
The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`.
## Creating a native executable
You can create a native executable using:
```shell script
./mvnw package -Pnative
```
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
```shell script
./mvnw package -Pnative -Dquarkus.native.container-build=true
```
You can then execute your native executable with: `./target/subscription-validator-webhook-1.0.0-SNAPSHOT-runner`
If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.
## Related Guides
- RESTEasy Reactive ([guide](https://quarkus.io/guides/resteasy-reactive)): A JAX-RS implementation utilizing build time processing and Vert.x. This extension is not compatible with the quarkus-resteasy extension, or any of the extensions that depend on it.
## Provided Code
### RESTEasy Reactive
Easily start your Reactive RESTful Web Services
[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources)
近期下载者:
相关文件:
收藏者: