diff --git a/PROJECT b/PROJECT index 758a3b0..a00b383 100644 --- a/PROJECT +++ b/PROJECT @@ -9,6 +9,7 @@ resources: namespaced: true controller: true domain: skynewz.dev + group: putio kind: Feed path: github.com/SkYNewZ/putio-operator/api/v1alpha1 version: v1alpha1 diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index 9830c8d..d5413c6 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the v1alpha1 API group // +kubebuilder:object:generate=true -// +groupName=skynewz.dev +// +groupName=putio.skynewz.dev package v1alpha1 import ( @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "skynewz.dev", Version: "v1alpha1"} + GroupVersion = schema.GroupVersion{Group: "putio.skynewz.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/config/crd/bases/skynewz.dev_feeds.yaml b/config/crd/bases/putio.skynewz.dev_feeds.yaml similarity index 99% rename from config/crd/bases/skynewz.dev_feeds.yaml rename to config/crd/bases/putio.skynewz.dev_feeds.yaml index 610fbd9..8f484db 100644 --- a/config/crd/bases/skynewz.dev_feeds.yaml +++ b/config/crd/bases/putio.skynewz.dev_feeds.yaml @@ -5,9 +5,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.9.2 creationTimestamp: null - name: feeds.skynewz.dev + name: feeds.putio.skynewz.dev spec: - group: skynewz.dev + group: putio.skynewz.dev names: kind: Feed listKind: FeedList diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 6ccd38e..2f3b0bb 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,7 +2,7 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: -- bases/skynewz.dev_feeds.yaml +- bases/putio.skynewz.dev_feeds.yaml #+kubebuilder:scaffold:crdkustomizeresource patchesStrategicMerge: diff --git a/config/crd/patches/cainjection_in_feeds.yaml b/config/crd/patches/cainjection_in_feeds.yaml index 7c37709..3ddb17a 100644 --- a/config/crd/patches/cainjection_in_feeds.yaml +++ b/config/crd/patches/cainjection_in_feeds.yaml @@ -4,4 +4,4 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME - name: feeds.skynewz.dev + name: feeds.putio.skynewz.dev diff --git a/config/crd/patches/webhook_in_feeds.yaml b/config/crd/patches/webhook_in_feeds.yaml index a273ca8..09beac9 100644 --- a/config/crd/patches/webhook_in_feeds.yaml +++ b/config/crd/patches/webhook_in_feeds.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: feeds.skynewz.dev + name: feeds.putio.skynewz.dev spec: conversion: strategy: Webhook diff --git a/config/rbac/feed_editor_role.yaml b/config/rbac/feed_editor_role.yaml index d525c75..9972d62 100644 --- a/config/rbac/feed_editor_role.yaml +++ b/config/rbac/feed_editor_role.yaml @@ -5,7 +5,7 @@ metadata: name: feed-editor-role rules: - apiGroups: - - skynewz.dev + - putio.skynewz.dev resources: - feeds verbs: @@ -17,7 +17,7 @@ rules: - update - watch - apiGroups: - - skynewz.dev + - putio.skynewz.dev resources: - feeds/status verbs: diff --git a/config/rbac/feed_viewer_role.yaml b/config/rbac/feed_viewer_role.yaml index 51b4497..11dc843 100644 --- a/config/rbac/feed_viewer_role.yaml +++ b/config/rbac/feed_viewer_role.yaml @@ -5,7 +5,7 @@ metadata: name: feed-viewer-role rules: - apiGroups: - - skynewz.dev + - putio.skynewz.dev resources: - feeds verbs: @@ -13,7 +13,7 @@ rules: - list - watch - apiGroups: - - skynewz.dev + - putio.skynewz.dev resources: - feeds/status verbs: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 7a2edd0..8958023 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -21,7 +21,7 @@ rules: - list - watch - apiGroups: - - skynewz.dev + - putio.skynewz.dev resources: - feeds verbs: @@ -33,13 +33,13 @@ rules: - update - watch - apiGroups: - - skynewz.dev + - putio.skynewz.dev resources: - feeds/finalizers verbs: - update - apiGroups: - - skynewz.dev + - putio.skynewz.dev resources: - feeds/status verbs: diff --git a/config/samples/_v1alpha1_feed.yaml b/config/samples/putio_v1alpha1_feed.yaml similarity index 92% rename from config/samples/_v1alpha1_feed.yaml rename to config/samples/putio_v1alpha1_feed.yaml index 39dcf8b..2d9af92 100644 --- a/config/samples/_v1alpha1_feed.yaml +++ b/config/samples/putio_v1alpha1_feed.yaml @@ -1,4 +1,4 @@ -apiVersion: skynewz.dev/v1alpha1 +apiVersion: putio.skynewz.dev/v1alpha1 kind: Feed metadata: name: for-all-mankind @@ -16,7 +16,7 @@ spec: name: putio-token --- -apiVersion: skynewz.dev/v1alpha1 +apiVersion: putio.skynewz.dev/v1alpha1 kind: Feed metadata: name: house-of-the-dragons @@ -34,7 +34,7 @@ spec: name: putio-token --- -apiVersion: skynewz.dev/v1alpha1 +apiVersion: putio.skynewz.dev/v1alpha1 kind: Feed metadata: name: star-trek-strange-new-worlds diff --git a/controllers/feed_controller.go b/controllers/feed_controller.go index 36559bc..32652bd 100644 --- a/controllers/feed_controller.go +++ b/controllers/feed_controller.go @@ -58,9 +58,9 @@ type FeedReconciler struct { Recorder record.EventRecorder } -//+kubebuilder:rbac:groups=skynewz.dev,resources=feeds,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=skynewz.dev,resources=feeds/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=skynewz.dev,resources=feeds/finalizers,verbs=update +//+kubebuilder:rbac:groups=putio.skynewz.dev,resources=feeds,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=putio.skynewz.dev,resources=feeds/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=putio.skynewz.dev,resources=feeds/finalizers,verbs=update //+kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch //+kubebuilder:rbac:groups="",resources=events,verbs=create;patch