mirror of
https://github.com/lukaszraczylo/jobs-manager-operator.git
synced 2026-06-11 23:09:15 +00:00
Fix issue with the annotations and labels.
This commit is contained in:
@@ -176,7 +176,9 @@ params:
|
||||
imagePullPolicy:
|
||||
- "Always"
|
||||
labels:
|
||||
"label-name": "label-value"
|
||||
this/works: "true"
|
||||
annotations:
|
||||
this/works/aswell: "true"
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -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.21
|
||||
version: 0.0.24
|
||||
# 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.21"
|
||||
appVersion: "0.0.24"
|
||||
keywords:
|
||||
- operator
|
||||
- jobs
|
||||
|
||||
@@ -5,6 +5,18 @@ metadata:
|
||||
labels:
|
||||
{{- include "chart.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- jobs
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- jobsmanager.raczylo.com
|
||||
resources:
|
||||
@@ -31,28 +43,6 @@ 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/jobs-manager-operator
|
||||
tag: {{ .Chart.AppVersion }}
|
||||
repository: controller
|
||||
tag: latest
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
resources:
|
||||
- manager.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
|
||||
@@ -5,6 +5,18 @@ metadata:
|
||||
creationTimestamp: null
|
||||
name: manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- jobs
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- jobsmanager.raczylo.com
|
||||
resources:
|
||||
|
||||
@@ -53,11 +53,13 @@ func (cp *connPackage) compileParameters(params ...jobsmanagerv1beta1.ManagedJob
|
||||
cparams.ImagePullSecrets = append(cparams.ImagePullSecrets, params.ImagePullSecrets...)
|
||||
}
|
||||
if params.Labels != nil {
|
||||
cparams.Labels = make(map[string]string)
|
||||
for k, v := range params.Labels {
|
||||
cparams.Labels[k] = v
|
||||
}
|
||||
}
|
||||
if params.Annotations != nil {
|
||||
cparams.Annotations = make(map[string]string)
|
||||
for k, v := range params.Annotations {
|
||||
cparams.Annotations[k] = v
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ type ManagedJobReconciler struct {
|
||||
//+kubebuilder:rbac:groups=jobsmanager.raczylo.com,resources=managedjobs,verbs=get;list;watch;create;update;patch;delete
|
||||
//+kubebuilder:rbac:groups=jobsmanager.raczylo.com,resources=managedjobs/status,verbs=get;update;patch
|
||||
//+kubebuilder:rbac:groups=jobsmanager.raczylo.com,resources=managedjobs/finalizers,verbs=update
|
||||
//+kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete
|
||||
|
||||
func (r *ManagedJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
|
||||
_ = log.FromContext(ctx)
|
||||
|
||||
Reference in New Issue
Block a user