mirror of
https://github.com/lukaszraczylo/kubernetes-images-sync-operator.git
synced 2026-06-10 23:29:11 +00:00
Fix roles / missing privileges
This commit is contained in:
@@ -234,7 +234,7 @@ release-chart:
|
|||||||
cd ../helm-charts/; git add -A charts/packages; git fix; git push;
|
cd ../helm-charts/; git add -A charts/packages; git fix; git push;
|
||||||
cd ../helm-charts/charts/${CHART_NAME}; cr upload --config ../../chart-releaser.yaml --skip-existing;
|
cd ../helm-charts/charts/${CHART_NAME}; cr upload --config ../../chart-releaser.yaml --skip-existing;
|
||||||
cd ../helm-charts/charts/${CHART_NAME}; rm -fr .cr-index; mkdir .cr-index; cr index --config ../../chart-releaser.yaml; cp .cr-index/index.yaml ../../index.yaml;
|
cd ../helm-charts/charts/${CHART_NAME}; rm -fr .cr-index; mkdir .cr-index; cr index --config ../../chart-releaser.yaml; cp .cr-index/index.yaml ../../index.yaml;
|
||||||
git fix; git push
|
../helm-charts; git fix; git push
|
||||||
|
|
||||||
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
|
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
|
||||||
# $1 - target path with name of binary
|
# $1 - target path with name of binary
|
||||||
|
|||||||
+2
-2
@@ -10,9 +10,9 @@ description: |
|
|||||||
|
|
||||||
type: application
|
type: application
|
||||||
|
|
||||||
version: 0.1.7
|
version: 0.1.11
|
||||||
|
|
||||||
appVersion: "0.1.7"
|
appVersion: "0.1.11"
|
||||||
|
|
||||||
home: https://github.com/lukaszraczylo/kubernetes-images-sync-operator
|
home: https://github.com/lukaszraczylo/kubernetes-images-sync-operator
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,18 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
{{- include "chart.labels" . | nindent 4 }}
|
{{- include "chart.labels" . | nindent 4 }}
|
||||||
rules:
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- apps
|
- apps
|
||||||
resources:
|
resources:
|
||||||
@@ -37,8 +49,7 @@ rules:
|
|||||||
- apiGroups:
|
- apiGroups:
|
||||||
- raczylo.com
|
- raczylo.com
|
||||||
resources:
|
resources:
|
||||||
- clusterimageexports
|
- '*'
|
||||||
- clusterimages
|
|
||||||
verbs:
|
verbs:
|
||||||
- create
|
- create
|
||||||
- delete
|
- delete
|
||||||
@@ -50,13 +61,13 @@ rules:
|
|||||||
- apiGroups:
|
- apiGroups:
|
||||||
- raczylo.com
|
- raczylo.com
|
||||||
resources:
|
resources:
|
||||||
- clusterimageexports/finalizers
|
- '*/finalizers'
|
||||||
verbs:
|
verbs:
|
||||||
- update
|
- update
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- raczylo.com
|
- raczylo.com
|
||||||
resources:
|
resources:
|
||||||
- clusterimageexports/status
|
- '*/status'
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- patch
|
- patch
|
||||||
|
|||||||
@@ -22,4 +22,7 @@ rules:
|
|||||||
resources:
|
resources:
|
||||||
- clusterimages/status
|
- clusterimages/status
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
@@ -18,4 +18,5 @@ rules:
|
|||||||
resources:
|
resources:
|
||||||
- clusterimages/status
|
- clusterimages/status
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
- watch
|
||||||
@@ -22,4 +22,7 @@ rules:
|
|||||||
resources:
|
resources:
|
||||||
- clusterimageexports/status
|
- clusterimageexports/status
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
@@ -9,13 +9,8 @@ rules:
|
|||||||
- raczylo.com
|
- raczylo.com
|
||||||
resources:
|
resources:
|
||||||
- clusterimageexports
|
- clusterimageexports
|
||||||
|
- clusterimageexports/status
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
- apiGroups:
|
|
||||||
- raczylo.com
|
|
||||||
resources:
|
|
||||||
- clusterimageexports/status
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
+1
-1
@@ -11,7 +11,7 @@ cmRaczyloCom:
|
|||||||
- ALL
|
- ALL
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/lukaszraczylo/kubernetes-images-sync-operator
|
repository: ghcr.io/lukaszraczylo/kubernetes-images-sync-operator
|
||||||
tag: 0.1.7
|
tag: 0.1.11
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 500m
|
cpu: 500m
|
||||||
|
|||||||
@@ -25,3 +25,6 @@ rules:
|
|||||||
- clusterimages/status
|
- clusterimages/status
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
|||||||
@@ -21,3 +21,4 @@ rules:
|
|||||||
- clusterimages/status
|
- clusterimages/status
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
- watch
|
||||||
|
|||||||
@@ -25,3 +25,6 @@ rules:
|
|||||||
- clusterimageexports/status
|
- clusterimageexports/status
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
|||||||
@@ -11,13 +11,8 @@ rules:
|
|||||||
- raczylo.com
|
- raczylo.com
|
||||||
resources:
|
resources:
|
||||||
- clusterimageexports
|
- clusterimageexports
|
||||||
|
- clusterimageexports/status
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
- apiGroups:
|
|
||||||
- raczylo.com
|
|
||||||
resources:
|
|
||||||
- clusterimageexports/status
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
|
|||||||
+15
-4
@@ -4,6 +4,18 @@ kind: ClusterRole
|
|||||||
metadata:
|
metadata:
|
||||||
name: mr-raczylo-com
|
name: mr-raczylo-com
|
||||||
rules:
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- apps
|
- apps
|
||||||
resources:
|
resources:
|
||||||
@@ -36,8 +48,7 @@ rules:
|
|||||||
- apiGroups:
|
- apiGroups:
|
||||||
- raczylo.com
|
- raczylo.com
|
||||||
resources:
|
resources:
|
||||||
- clusterimageexports
|
- '*'
|
||||||
- clusterimages
|
|
||||||
verbs:
|
verbs:
|
||||||
- create
|
- create
|
||||||
- delete
|
- delete
|
||||||
@@ -49,13 +60,13 @@ rules:
|
|||||||
- apiGroups:
|
- apiGroups:
|
||||||
- raczylo.com
|
- raczylo.com
|
||||||
resources:
|
resources:
|
||||||
- clusterimageexports/finalizers
|
- '*/finalizers'
|
||||||
verbs:
|
verbs:
|
||||||
- update
|
- update
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- raczylo.com
|
- raczylo.com
|
||||||
resources:
|
resources:
|
||||||
- clusterimageexports/status
|
- '*/status'
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- patch
|
- patch
|
||||||
|
|||||||
@@ -29,12 +29,11 @@ type ClusterImageReconciler struct {
|
|||||||
ActiveJobs int
|
ActiveJobs int
|
||||||
}
|
}
|
||||||
|
|
||||||
// +kubebuilder:rbac:groups=raczylo.com,resources=clusterimages,verbs=get;list;watch;create;update;patch;delete
|
// +kubebuilder:rbac:groups=raczylo.com,resources=*,verbs=get;list;watch;create;update;patch;delete
|
||||||
// +kubebuilder:rbac:groups=raczylo.com,resources=clusterimages/status,verbs=get;update;patch
|
// +kubebuilder:rbac:groups=raczylo.com,resources=*/status,verbs=get;update;patch
|
||||||
// +kubebuilder:rbac:groups=raczylo.com,resources=clusterimages/finalizers,verbs=update
|
// +kubebuilder:rbac:groups=raczylo.com,resources=*/finalizers,verbs=update
|
||||||
// # additional RBAC rules - create and manage jobs
|
// # additional RBAC rules - create and manage jobs
|
||||||
// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete
|
// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete
|
||||||
// +kubebuilder:rbac:groups=raczylo.com,resources=clusterimageexports,verbs=get;list;watch;update;patch
|
|
||||||
func (r *ClusterImageReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
|
func (r *ClusterImageReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
|
||||||
l := log.FromContext(ctx)
|
l := log.FromContext(ctx)
|
||||||
|
|
||||||
|
|||||||
@@ -30,15 +30,15 @@ type ClusterImageExportReconciler struct {
|
|||||||
Scheme *runtime.Scheme
|
Scheme *runtime.Scheme
|
||||||
}
|
}
|
||||||
|
|
||||||
// +kubebuilder:rbac:groups=raczylo.com,resources=clusterimageexports,verbs=get;list;watch;create;update;patch;delete
|
// +kubebuilder:rbac:groups=raczylo.com,resources=*,verbs=get;list;watch;create;update;patch;delete
|
||||||
// +kubebuilder:rbac:groups=raczylo.com,resources=clusterimageexports/status,verbs=get;update;patch
|
// +kubebuilder:rbac:groups=raczylo.com,resources=*/status,verbs=get;update;patch
|
||||||
// +kubebuilder:rbac:groups=raczylo.com,resources=clusterimageexports/finalizers,verbs=update
|
// +kubebuilder:rbac:groups=raczylo.com,resources=*/finalizers,verbs=update
|
||||||
// additional RBAC rules
|
// additional RBAC rules
|
||||||
// +kubebuilder:rbac:groups=raczylo.com,resources=clusterimages,verbs=get;list;watch;create;update;patch;delete
|
|
||||||
// +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch
|
// +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch
|
||||||
// +kubebuilder:rbac:groups=apps,resources=daemonsets,verbs=get;list;watch
|
// +kubebuilder:rbac:groups=apps,resources=daemonsets,verbs=get;list;watch
|
||||||
// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete
|
// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete
|
||||||
// +kubebuilder:rbac:groups=batch,resources=cronjobs,verbs=get;list;watch
|
// +kubebuilder:rbac:groups=batch,resources=cronjobs,verbs=get;list;watch
|
||||||
|
// +kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch;create;update;patch;delete
|
||||||
|
|
||||||
const clusterImageExportFinalizer = "finalizer.clusterimageexport.raczylo.com"
|
const clusterImageExportFinalizer = "finalizer.clusterimageexport.raczylo.com"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user