Compare commits

...
6 Commits
15 changed files with 73 additions and 8 deletions
+10
View File
@@ -4,9 +4,19 @@ on:
push:
branches:
- main
paths-ignore:
- 'charts/**'
- 'docs/**'
- '.github/**'
- 'README.md'
pull_request:
branches:
- main
paths-ignore:
- 'charts/**'
- 'docs/**'
- '.github/**'
- 'README.md'
workflow_dispatch:
jobs:
+1
View File
@@ -8,6 +8,7 @@
bin
testbin/*
Dockerfile.cross
chart-releaser.yaml
# Test binary, build with `go test -c`
*.test
+33 -1
View File
@@ -5,7 +5,15 @@ This operator is responsible for managing the lifecycle of complicated workflows
## Getting Started
### Prerequisites
### Installation with helm
```sh
helm repo add raczylo https://lukaszraczylo.github.io/helm-charts/
helm repo update raczylo
helm install jobs-manager raczylo/jobs-manager
```
### Prerequisites for local runs
- [go](https://golang.org/dl/) v1.16+
- [kustomize](https://sigs.k8s.io/kustomize/docs/INSTALL.md) v3.5.4+
- [docker](https://docs.docker.com/install/) v19.03.8+
@@ -100,6 +108,30 @@ In this case - result for the first job will look like this:
status: succeeded
```
### Kustomization and references
In case of any issues with `configmapGenerator` or `secretGenerator`, please add following to your `kustomization.yaml`:
```yaml
configurations:
- crd-name-reference.yaml
```
Then you can create `crd-name-reference.yaml` file with following content:
```yaml
---
nameReference:
- kind: 'ConfigMap'
fieldSpecs:
- kind: 'ManagedJob'
path: 'spec/params/fromEnv[]/configMapRef/name'
- kind: 'ManagedJob'
path: 'spec/params/env[]/configMapRef/name'
```
This will instruct kustomize to replace all references to configmaps with their names if they are managed by generators.
### Running on the cluster
#### Manual installation
@@ -13,12 +13,12 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.2
version: 0.0.8
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.2"
appVersion: "0.0.8"
keywords:
- operator
- jobs
@@ -31,6 +31,28 @@ rules:
- get
- patch
- update
# Add ability to manage jobs
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
# Add access to events
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
@@ -12,8 +12,8 @@ controllerManager:
memory: 64Mi
manager:
image:
repository: ghcr.io/lukaszraczylo/jobsmanager
tag: 0.0.2
repository: ghcr.io/lukaszraczylo/jobs-manager-operator
tag: 0.0.5
resources:
limits:
cpu: 500m
+3 -3
View File
@@ -34,9 +34,9 @@ func (cp *connPackage) compileParameters(params ...jobsmanagerv1beta1.ManagedJob
if params.Env != nil {
cparams.Env = append(cparams.Env, params.Env...)
}
// if params.Volumes != nil {
// cparams.Volumes = append(cparams.Volumes, params.Volumes...)
// }
if params.Volumes != nil {
cparams.Volumes = append(cparams.Volumes, params.Volumes...)
}
if params.VolumeMounts != nil {
cparams.VolumeMounts = append(cparams.VolumeMounts, params.VolumeMounts...)
}