added images
This commit is contained in:
54
config/crd/bases/server-manager.acooldomain.co_images.yaml
Normal file
54
config/crd/bases/server-manager.acooldomain.co_images.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.1
|
||||
name: images.server-manager.acooldomain.co
|
||||
spec:
|
||||
group: server-manager.acooldomain.co
|
||||
names:
|
||||
kind: Image
|
||||
listKind: ImageList
|
||||
plural: images
|
||||
singular: image
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Image is the Schema for the images API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ImageSpec defines the desired state of Image
|
||||
properties:
|
||||
location:
|
||||
description: |-
|
||||
INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
||||
Important: Run "make" to regenerate code after modifying this file
|
||||
type: string
|
||||
required:
|
||||
- location
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
@@ -3,6 +3,7 @@
|
||||
# It should be run by config/default
|
||||
resources:
|
||||
- bases/server-manager.acooldomain.co_servermanagers.yaml
|
||||
- bases/server-manager.acooldomain.co_images.yaml
|
||||
# +kubebuilder:scaffold:crdkustomizeresource
|
||||
|
||||
patches:
|
||||
@@ -13,6 +14,7 @@ patches:
|
||||
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
|
||||
# patches here are for enabling the CA injection for each CRD
|
||||
#- path: patches/cainjection_in_servermanagers.yaml
|
||||
#- path: patches/cainjection_in_images.yaml
|
||||
# +kubebuilder:scaffold:crdkustomizecainjectionpatch
|
||||
|
||||
# [WEBHOOK] To enable webhook, uncomment the following section
|
||||
|
27
config/rbac/image_editor_role.yaml
Normal file
27
config/rbac/image_editor_role.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
# permissions for end users to edit images.
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: kubernetes-operator
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
name: image-editor-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- server-manager.acooldomain.co
|
||||
resources:
|
||||
- images
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- server-manager.acooldomain.co
|
||||
resources:
|
||||
- images/status
|
||||
verbs:
|
||||
- get
|
23
config/rbac/image_viewer_role.yaml
Normal file
23
config/rbac/image_viewer_role.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
# permissions for end users to view images.
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: kubernetes-operator
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
name: image-viewer-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- server-manager.acooldomain.co
|
||||
resources:
|
||||
- images
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- server-manager.acooldomain.co
|
||||
resources:
|
||||
- images/status
|
||||
verbs:
|
||||
- get
|
@@ -22,6 +22,8 @@ resources:
|
||||
# default, aiding admins in cluster management. Those roles are
|
||||
# not used by the Project itself. You can comment the following lines
|
||||
# if you do not want those helpers be installed with your Project.
|
||||
- image_editor_role.yaml
|
||||
- image_viewer_role.yaml
|
||||
- servermanager_editor_role.yaml
|
||||
- servermanager_viewer_role.yaml
|
||||
|
||||
|
@@ -22,6 +22,13 @@ rules:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- server-manager.acooldomain.co
|
||||
resources:
|
||||
- images
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- server-manager.acooldomain.co
|
||||
resources:
|
||||
|
@@ -1,4 +1,5 @@
|
||||
## Append samples of your project ##
|
||||
resources:
|
||||
- server-manager_v1alpha1_servermanager.yaml
|
||||
- server-manager_v1alpha1_image.yaml
|
||||
# +kubebuilder:scaffold:manifestskustomizesamples
|
||||
|
9
config/samples/server-manager_v1alpha1_image.yaml
Normal file
9
config/samples/server-manager_v1alpha1_image.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
apiVersion: server-manager.acooldomain.co/v1alpha1
|
||||
kind: Image
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: kubernetes-operator
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
name: image-sample
|
||||
spec:
|
||||
# TODO(user): Add fields here
|
Reference in New Issue
Block a user