Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Release 0.1.3 #48

Merged
merged 2 commits into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 47 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,39 @@
![GitHub release (latest by date)](https://img.shields.io/github/v/release/keptn-sandbox/job-executor-service)
[![Go Report Card](https://goreportcard.com/badge/github.com/keptn-sandbox/job-executor-service)](https://goreportcard.com/report/github.com/keptn-sandbox/job-executor-service)

- [Job Executor Service](#job-executor-service)
- [Why?](#why)
- [How?](#how)
- [Specifying the working directory](#specifying-the-working-directory)
- [Event Matching](#event-matching)
- [Kubernetes Job](#kubernetes-job)
- [Kubernetes Job Environment Variables](#kubernetes-job-environment-variables)
- [From Events](#from-events)
- [From Kubernetes Secrets](#from-kubernetes-secrets)
- [From string literal](#from-string-literal)
- [File Handling](#file-handling)
- [Silent mode](#silent-mode)
- [Resource quotas for jobs](#resource-quotas-for-jobs)
- [Poll duration for jobs](#poll-duration-for-jobs)
- [Remote Control Plane](#remote-control-plane)
- [How to validate a job configuration](#how-to-validate-a-job-configuration)
- [Endless Possibilities](#endless-possibilities)
- [Credits](#credits)
- [Compatibility Matrix](#compatibility-matrix)
- [Installation](#installation)
- [Deploy in your Kubernetes cluster](#deploy-in-your-kubernetes-cluster)
- [Up- or Downgrading](#up--or-downgrading)
- [Uninstall](#uninstall)
- [Development](#development)
- [Common tasks](#common-tasks)
- [Testing Cloud Events](#testing-cloud-events)
- [Automation](#automation)
- [GitHub Actions: Automated Pull Request Review](#github-actions-automated-pull-request-review)
- [GitHub Actions: Unit Tests](#github-actions-unit-tests)
- [GH Actions/Workflow: Build Docker Images](#gh-actionsworkflow-build-docker-images)
- [How to release a new version of this service](#how-to-release-a-new-version-of-this-service)
- [License](#license)

This Keptn service introduces a radical new approach to running tasks with keptn. It provides the means to run any
container as a Kubernetes Job orchestrated by keptn.

Expand Down Expand Up @@ -416,6 +449,18 @@ If you are using the service in a remote control plane setup make sure the distr
events used in the `job/config.yaml`. Just edit the `PUBSUB_TOPIC` environment variable in the distributor deployment
configuration to fit your needs.

## How to validate a job configuration

`job-lint` is a simple cli tool that validates any given job configuration file and shows possible errors.

```shell
./job-lint test-data/config.yaml

2021/07/13 16:18:49 config ../test-data/config.yaml is valid
```

For each release beginning with `0.1.3` compatible binaries are attached.

## Endless Possibilities

* Run the helm service as a kubernetes job and limit the permissions of it by assigning a different service account to
Expand All @@ -435,7 +480,7 @@ The credits of this service heavily go to @thschue and @yeahservice who original
| 0.8.3 | keptnsandbox/job-executor-service:0.1.0 | - |
| 0.8.3 | keptnsandbox/job-executor-service:0.1.1 | - |
| 0.8.4 | keptnsandbox/job-executor-service:0.1.2 | v1 |
| 0.8.4 | keptnsandbox/job-executor-service:0.1.3 | v2 |
| 0.8.6 | keptnsandbox/job-executor-service:0.1.3 | v2 |

## Installation

Expand Down Expand Up @@ -552,8 +597,7 @@ To make use of the built-in automation using GH Actions for releasing a new vers
* check the output of GH Actions builds for the release branch,
* verify that your image was built and pushed to DockerHub with the right tags,
* update the image tags for `job-executor-service` and `job-executor-service-initcontainer`
in [`deploy/service.yaml`](deploy/service.yaml), [`helm/Chart.yaml`](helm/Chart.yaml),
[`helm/values.yaml`](helm/values.yaml), [`helm/templates/configmap.yaml`](helm/templates/configmap.yaml) and
in [`deploy/service.yaml`](deploy/service.yaml), [`helm/Chart.yaml`](helm/Chart.yaml) and
the `app.kubernetes.io/version` in [`deploy/service.yaml`](deploy/service.yaml)
* test your service against a working Keptn installation.

Expand Down
6 changes: 3 additions & 3 deletions deploy/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ spec:
labels:
run: job-executor-service
app.kubernetes.io/name: job-executor-service
app.kubernetes.io/version: 0.1.2
app.kubernetes.io/version: 0.1.3
spec:
containers:
- name: job-executor-service
image: keptnsandbox/job-executor-service:0.1.2
image: keptnsandbox/job-executor-service:0.1.3
ports:
- containerPort: 8080
resources:
Expand All @@ -37,7 +37,7 @@ spec:
- name: JOB_NAMESPACE
value: 'keptn'
- name: INIT_CONTAINER_IMAGE
value: 'keptnsandbox/job-executor-service-initcontainer:0.1.2'
value: 'keptnsandbox/job-executor-service-initcontainer:0.1.3'
- name: DEFAULT_RESOURCE_LIMITS_CPU
value: "1"
- name: DEFAULT_RESOURCE_LIMITS_MEMORY
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ require (
go.uber.org/zap v1.16.0 // indirect
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
golang.org/x/net v0.0.0-20210510120150-4163338589ed // indirect
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 // indirect
golang.org/x/sys v0.0.0-20210603125802-9665404d3644 // indirect
golang.org/x/term v0.0.0-20210429154555-c04ba851c2a4 // indirect
golang.org/x/tools v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0
gotest.tools v2.2.0+incompatible
honnef.co/go/tools v0.1.3 // indirect
k8s.io/api v0.21.3
k8s.io/apimachinery v0.21.3
k8s.io/client-go v0.21.3
Expand Down
11 changes: 6 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,8 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 h1:hZR0X1kPW+nwyJ9xRxqZk1vx5RUObAPBdKVvXPDUH/E=
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603125802-9665404d3644 h1:CA1DEQ4NdKphKeL70tvsWNdT5oFh1lOjihRcEDROi0I=
golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down Expand Up @@ -1063,8 +1063,9 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.1 h1:wGiQel/hW0NnEkJUk8lbzkX2gFJU6PFxf1v5OlCfuOs=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down Expand Up @@ -1235,11 +1236,11 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o=
honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU=
k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s=
k8s.io/api v0.21.2/go.mod h1:Lv6UGJZ1rlMI1qusN8ruAp9PUBFyBwpEHAdG24vIsiU=
k8s.io/api v0.21.3 h1:cblWILbLO8ar+Fj6xdDGr603HRsf8Wu9E9rngJeprZQ=
k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg=
k8s.io/apiextensions-apiserver v0.21.0 h1:Nd4uBuweg6ImzbxkC1W7xUNZcCV/8Vt10iTdTIVF3hw=
Expand Down
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
appVersion: 0.1.2
appVersion: 0.1.3
description: Helm Chart for the keptn job-executor-service
name: job-executor-service
type: application
version: 0.1.2
version: 0.1.3
16 changes: 16 additions & 0 deletions releasenotes/releasenotes_V0.1.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Release Notes v0.1.3

Compatible with Keptn 0.8.6

## New Features
* Allow array of strings for command, add args that are also passed through to the kubernetes job (#31)
* Provide a cli tool that validates job configurations (#33)
* Support env variables from string (#34, #36)
* Allow setting the working directory of a kubernetes job (#38)
* Configurable job timeout (#40, #43)

## Fixed Issues
* Fix kubernetes labels used by distributor for uniform registration (#32)

## Known Limitations
* Uniform registration for remote execution planes over https doesn't work (https://github.com/keptn/keptn/issues/4516)