You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2024. It is now read-only.
@@ -9,19 +9,19 @@ to run any container as a Kubernetes Job orchestrated by keptn.
9
9
10
10
## Why?
11
11
12
-
The generic jobservice aims to tackle several current pain points with the current approach of services running in the keptn ecosystem:
12
+
The job-executor-service aims to tackle several current pain points with the current approach of services running in the keptn ecosystem:
13
13
14
14
| Problem | Solution |
15
15
|----------------|----------------|
16
16
| Keptn services are constantly running while listening for cloud events coming in over NATS. This consumes unnecessary resources on the Kubernetes cluster. | By running the defined keptn tasks as short-lived workloads (Kubernetes Jobs), they just consume resources while the task is executed. |
17
17
| Whenever some new functionality should be triggered by keptn, a new keptn service needs to be written. It usually wraps the functionality of the wanted framework and executes it under the hood. The downside: The code of the new keptn service needs to be written and maintained. This effort scales linearly with the amount of services. | This service can execute any framework with just a few lines of yaml configuration. No need to write or maintain any new code. |
18
-
| Keptn services usually filter for a static list of events the trigger the included functionality. This is not configurable. Whenever the service should listen to a new event, the code of the service needs to be changed. | The Generic Job Service provides the means to trigger a task execution for any keptn event. This is done by matching a jsonpath to the received event payload. |
18
+
| Keptn services usually filter for a static list of events the trigger the included functionality. This is not configurable. Whenever the service should listen to a new event, the code of the service needs to be changed. | The Job Executor Service provides the means to trigger a task execution for any keptn event. This is done by matching a jsonpath to the received event payload. |
19
19
| Keptn services are usually opinionized on how your framework execution looks like. E.g. the locust service just executes three different (statically named) files depending on the test strategy in the shipyard. It is not possible to write tests consisting of multiply files. | This service provides the possibility to write any specified file from the keptn git repository into a mounted folder (`/keptn`) of the Kubernetes job. This is done by a initcontainer running before the specified image. |
20
-
| Support for new functionality in keptn needs to be added to each keptn service individually. E.g. the new secret functionality needs to be included into all of the services running in the keptn execution plane. This slows down the availability of this new feature. | The Generic Job Service is a single service which provides the means to run any workload orchestrated by keptn. So, it is possible to support new functionality of keptn just once in this service - and all workloads profit from it. E.g. in the case of the secret functionality, one just needs to support it in this service and suddenly all the triggered Kubernetes Jobs have the correct secrets attached to it as environment variables. |
20
+
| Support for new functionality in keptn needs to be added to each keptn service individually. E.g. the new secret functionality needs to be included into all of the services running in the keptn execution plane. This slows down the availability of this new feature. | The Job Executor Service is a single service which provides the means to run any workload orchestrated by keptn. So, it is possible to support new functionality of keptn just once in this service - and all workloads profit from it. E.g. in the case of the secret functionality, one just needs to support it in this service and suddenly all the triggered Kubernetes Jobs have the correct secrets attached to it as environment variables. |
21
21
22
22
## How?
23
23
24
-
Just put a file into the keptn git repository (in folder `<service>/generic-job/config.yaml`) to specify
24
+
Just put a file into the keptn git repository (in folder `<service>/job/config.yaml`) to specify
25
25
* the containers which should be run as Kubernetes Jobs and
26
26
* the events for which they should be triggered.
27
27
@@ -43,7 +43,7 @@ actions:
43
43
44
44
### Event Matching
45
45
46
-
The configuration located in `<service>/generic-job/config.yaml` contains the following section:
46
+
The configuration located in `<service>/job/config.yaml` contains the following section:
47
47
48
48
```
49
49
jsonpath:
@@ -136,40 +136,40 @@ The credits of this service heavily go to @thschue and @augustin-dt who original
136
136
137
137
*Please fill in your versions accordingly*
138
138
139
-
| Keptn Version | [Keptn-Generic-Job-Service Docker Image](https://hub.docker.com/r/didiladi/keptn-generic-job-service/tags) |
139
+
| Keptn Version | [Job-Executor-Service Docker Image](https://hub.docker.com/r/didiladi/job-executor-service/tags) |
The *keptn-generic-job-service* can be installed as a part of [Keptn's uniform](https://keptn.sh).
145
+
The *job-executor-service* can be installed as a part of [Keptn's uniform](https://keptn.sh).
146
146
147
147
### Deploy in your Kubernetes cluster
148
148
149
-
To deploy the current version of the *keptn-generic-job-service* in your Keptn Kubernetes cluster, apply the [`deploy/service.yaml`](deploy/service.yaml) file:
149
+
To deploy the current version of the *job-executor-service* in your Keptn Kubernetes cluster, apply the [`deploy/service.yaml`](deploy/service.yaml) file:
150
150
151
151
```console
152
152
kubectl apply -f deploy/service.yaml
153
153
```
154
154
155
-
This should install the `keptn-generic-job-service` together with a Keptn `distributor` into the `keptn` namespace, which you can verify using
155
+
This should install the `job-executor-service` together with a Keptn `distributor` into the `keptn` namespace, which you can verify using
156
156
157
157
```console
158
-
kubectl -n keptn get deployment keptn-generic-job-service -o wide
159
-
kubectl -n keptn get pods -l run=keptn-generic-job-service
158
+
kubectl -n keptn get deployment job-executor-service -o wide
159
+
kubectl -n keptn get pods -l run=job-executor-service
160
160
```
161
161
162
162
### Up- or Downgrading
163
163
164
164
Adapt and use the following command in case you want to up- or downgrade your installed version (specified by the `$VERSION` placeholder):
165
165
166
166
```console
167
-
kubectl -n keptn set image deployment/keptn-generic-job-service keptn-generic-job-service=didiladi/keptn-generic-job-service:$VERSION --record
167
+
kubectl -n keptn set image deployment/job-executor-service job-executor-service=didiladi/job-executor-service:$VERSION --record
168
168
```
169
169
170
170
### Uninstall
171
171
172
-
To delete a deployed *keptn-generic-job-service*, use the file `deploy/*.yaml` files from this repository and delete the Kubernetes resources:
172
+
To delete a deployed *job-executor-service*, use the file `deploy/*.yaml` files from this repository and delete the Kubernetes resources:
173
173
174
174
```console
175
175
kubectl delete -f deploy/service.yaml
@@ -190,16 +190,16 @@ When writing code, it is recommended to follow the coding style suggested by the
* Build the docker image: `docker build . -t didiladi/keptn-generic-job-service:dev` (Note: Ensure that you use the correct DockerHub account/organization)
196
-
* Run the docker image locally: `docker run --rm -it -p 8080:8080 didiladi/keptn-generic-job-service:dev`
197
-
* Push the docker image to DockerHub: `docker push didiladi/keptn-generic-job-service:dev` (Note: Ensure that you use the correct DockerHub account/organization)
195
+
* Build the docker image: `docker build . -t didiladi/job-executor-service:dev` (Note: Ensure that you use the correct DockerHub account/organization)
196
+
* Run the docker image locally: `docker run --rm -it -p 8080:8080 didiladi/job-executor-service:dev`
197
+
* Push the docker image to DockerHub: `docker push didiladi/job-executor-service:dev` (Note: Ensure that you use the correct DockerHub account/organization)
198
198
* Deploy the service using `kubectl`: `kubectl apply -f deploy/`
199
199
* Delete/undeploy the service using `kubectl`: `kubectl delete -f deploy/`
200
-
* Watch the deployment using `kubectl`: `kubectl -n keptn get deployment keptn-generic-job-service -o wide`
201
-
* Get logs using `kubectl`: `kubectl -n keptn logs deployment/keptn-generic-job-service -f`
202
-
* Watch the deployed pods using `kubectl`: `kubectl -n keptn get pods -l run=keptn-generic-job-service`
200
+
* Watch the deployment using `kubectl`: `kubectl -n keptn get deployment job-executor-service -o wide`
201
+
* Get logs using `kubectl`: `kubectl -n keptn logs deployment/job-executor-service -f`
202
+
* Watch the deployed pods using `kubectl`: `kubectl -n keptn get pods -l run=job-executor-service`
203
203
* Deploy the service using [Skaffold](https://skaffold.dev/): `skaffold run --default-repo=your-docker-registry --tail` (Note: Replace `your-docker-registry` with your DockerHub username; also make sure to adapt the image name in [skaffold.yaml](skaffold.yaml))
204
204
205
205
@@ -225,7 +225,7 @@ You can find the details in [.github/workflows/tests.yml](.github/workflows/test
225
225
226
226
This repo uses GH Actions and Workflows to test the code and automatically build docker images.
227
227
228
-
Docker Images are automatically pushed based on the configuration done in [.ci_env](.ci_env) and the two [GitHub Secrets](https://github.com/keptn-sandbox/keptn-generic-job-service/settings/secrets/actions)
228
+
Docker Images are automatically pushed based on the configuration done in [.ci_env](.ci_env) and the two [GitHub Secrets](https://github.com/keptn-sandbox/job-executor-service/settings/secrets/actions)
229
229
*`REGISTRY_USER` - your DockerHub username
230
230
*`REGISTRY_PASSWORD` - a DockerHub [access token](https://hub.docker.com/settings/security) (alternatively, your DockerHub password)
231
231
@@ -246,7 +246,7 @@ If any problems occur, fix them in the release branch and test them again.
246
246
247
247
Once you have confirmed that everything works and your version is ready to go, you should
248
248
249
-
* create a new release on the release branch using the [GitHub releases page](https://github.com/keptn-sandbox/keptn-generic-job-service/releases), and
249
+
* create a new release on the release branch using the [GitHub releases page](https://github.com/keptn-sandbox/job-executor-service/releases), and
250
250
* merge any changes from the release branch back to the master branch.
0 commit comments