Skip to content
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
2 changes: 1 addition & 1 deletion .github/.testcoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exclude:
# Exclude files or packages matching their paths
paths:
- .*mock.* # excludes all generated mock files
- ^api/v1 # exclude api/v1
- ^api/v1alpha1 # exclude api/v1alpha1
- ^test/ # exclude test files
- ^cmd # exclude cmd files

Expand Down
4 changes: 2 additions & 2 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ resources:
domain: github.com
group: app
kind: AppDeployment
path: github.com/Azure/operation-cache-controller/api/v1
version: v1
path: github.com/Azure/operation-cache-controller/api/v1alpha1
version: v1alpha1
version: "3"
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1
package v1alpha1

import (
batchv1 "k8s.io/api/batch/v1"
Expand Down
2 changes: 1 addition & 1 deletion api/v1/cache_types.go → api/v1alpha1/cache_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Package v1 contains API Schema definitions for the app v1 API group.
// Package v1alpha1 contains API Schema definitions for the app v1alpha1 API group.
// +kubebuilder:object:generate=true
// +groupName=app.github.com
package v1
// +groupName=controller.azure.github.com
package v1alpha1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -26,7 +26,7 @@ import (

var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "app.github.com", Version: "v1"}
GroupVersion = schema.GroupVersion{Group: "controller.azure.github.com", Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1
package v1alpha1

import (
batchv1 "k8s.io/api/batch/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

appv1 "github.com/Azure/operation-cache-controller/api/v1"
v1alpha1 "github.com/Azure/operation-cache-controller/api/v1alpha1"
"github.com/Azure/operation-cache-controller/internal/controller"
// +kubebuilder:scaffold:imports
)
Expand All @@ -50,7 +50,7 @@ var (
func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))

utilruntime.Must(appv1.AddToScheme(scheme))
utilruntime.Must(v1alpha1.AddToScheme(scheme))
// +kubebuilder:scaffold:scheme
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.17.2
name: appdeployments.app.github.com
name: appdeployments.controller.azure.github.com
spec:
group: app.github.com
group: controller.azure.github.com
names:
kind: AppDeployment
listKind: AppDeploymentList
Expand All @@ -21,7 +21,7 @@ spec:
- jsonPath: .metadata.ownerReferences[0].name
name: Owner
type: string
name: v1
name: v1alpha1
schema:
openAPIV3Schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.17.2
name: caches.app.github.com
name: caches.controller.azure.github.com
spec:
group: app.github.com
group: controller.azure.github.com
names:
kind: Cache
listKind: CacheList
plural: caches
singular: cache
scope: Namespaced
versions:
- name: v1
- name: v1alpha1
schema:
openAPIV3Schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.17.2
name: operations.app.github.com
name: operations.controller.azure.github.com
spec:
group: app.github.com
group: controller.azure.github.com
names:
kind: Operation
listKind: OperationList
Expand All @@ -21,7 +21,7 @@ spec:
- jsonPath: .status.cacheKey
name: Key
type: string
name: v1
name: v1alpha1
schema:
openAPIV3Schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.17.2
name: requirements.app.github.com
name: requirements.controller.azure.github.com
spec:
group: app.github.com
group: controller.azure.github.com
names:
kind: Requirement
listKind: RequirementList
Expand All @@ -21,7 +21,7 @@ spec:
- jsonPath: .status.operationId
name: OperationId
type: string
name: v1
name: v1alpha1
schema:
openAPIV3Schema:
properties:
Expand Down
8 changes: 4 additions & 4 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
- bases/app.github.com_appdeployments.yaml
- bases/app.github.com_operations.yaml
- bases/app.github.com_caches.yaml
- bases/app.github.com_requirements.yaml
- bases/controller.azure.github.com_appdeployments.yaml
- bases/controller.azure.github.com_operations.yaml
- bases/controller.azure.github.com_caches.yaml
- bases/controller.azure.github.com_requirements.yaml
# +kubebuilder:scaffold:crdkustomizeresource

patches:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/appdeployment_admin_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project operation-cache-controller itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants full permissions ('*') over app.github.com.
# Grants full permissions ('*') over controller.azure.github.com.
# This role is intended for users authorized to modify roles and bindings within the cluster,
# enabling them to delegate specific permissions to other users or groups as needed.

Expand All @@ -14,13 +14,13 @@ metadata:
name: appdeployment-admin-role
rules:
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- appdeployments
verbs:
- '*'
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- appdeployments/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/appdeployment_editor_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project operation-cache-controller itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants permissions to create, update, and delete resources within the app.github.com.
# Grants permissions to create, update, and delete resources within the controller.azure.github.com.
# This role is intended for users who need to manage these resources
# but should not control RBAC or manage permissions for others.

Expand All @@ -14,7 +14,7 @@ metadata:
name: appdeployment-editor-role
rules:
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- appdeployments
verbs:
Expand All @@ -26,7 +26,7 @@ rules:
- update
- watch
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- appdeployments/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/appdeployment_viewer_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project operation-cache-controller itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants read-only access to app.github.com resources.
# Grants read-only access to controller.azure.github.com resources.
# This role is intended for users who need visibility into these resources
# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing.

Expand All @@ -14,15 +14,15 @@ metadata:
name: appdeployment-viewer-role
rules:
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- appdeployments
verbs:
- get
- list
- watch
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- appdeployments/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/cache_admin_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project operation-cache-controller itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants full permissions ('*') over app.github.com.
# Grants full permissions ('*') over controller.azure.github.com.
# This role is intended for users authorized to modify roles and bindings within the cluster,
# enabling them to delegate specific permissions to other users or groups as needed.

Expand All @@ -14,13 +14,13 @@ metadata:
name: cache-admin-role
rules:
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- caches
verbs:
- '*'
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- caches/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/cache_editor_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project operation-cache-controller itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants permissions to create, update, and delete resources within the app.github.com.
# Grants permissions to create, update, and delete resources within the controller.azure.github.com.
# This role is intended for users who need to manage these resources
# but should not control RBAC or manage permissions for others.

Expand All @@ -14,7 +14,7 @@ metadata:
name: cache-editor-role
rules:
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- caches
verbs:
Expand All @@ -26,7 +26,7 @@ rules:
- update
- watch
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- caches/status
verbs:
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/cache_viewer_role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This rule is not used by the project operation-cache-controller itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants read-only access to app.github.com resources.
# Grants read-only access to controller.azure.github.com resources.
# This role is intended for users who need visibility into these resources
# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing.

Expand All @@ -14,15 +14,15 @@ metadata:
name: cache-viewer-role
rules:
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- caches
verbs:
- get
- list
- watch
- apiGroups:
- app.github.com
- controller.azure.github.com
resources:
- caches/status
verbs:
Expand Down
Loading