diff --git a/apis/objectstore/v100/master_types.go b/apis/objectstore/v100/master_types.go index 9dccda7..f2c6bb5 100644 --- a/apis/objectstore/v100/master_types.go +++ b/apis/objectstore/v100/master_types.go @@ -28,8 +28,10 @@ type MasterSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file - // Foo is an example field of Master. Edit Master_types.go to remove/update - Foo string `json:"foo,omitempty"` + // Mdir is data directory to store meta data + Mdir string `json:"mdir,omitempty"` + // MetricsAddress is Prometheus gateway address + MetricsAddress string `json:"metricsAddress,omitempty"` } // MasterStatus defines the observed state of Master diff --git a/config/crd/bases/objectstore.seaweedfs.com_masters.yaml b/config/crd/bases/objectstore.seaweedfs.com_masters.yaml new file mode 100644 index 0000000..6652fdc --- /dev/null +++ b/config/crd/bases/objectstore.seaweedfs.com_masters.yaml @@ -0,0 +1,60 @@ + +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.3.0 + creationTimestamp: null + name: masters.objectstore.seaweedfs.com +spec: + group: objectstore.seaweedfs.com + names: + kind: Master + listKind: MasterList + plural: masters + singular: master + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + description: Master is the Schema for the masters 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: MasterSpec defines the desired state of Master + properties: + mdir: + description: Mdir is data directory to store meta data + type: string + metricsAddress: + description: MetricsAddress is Prometheus gateway address + type: string + type: object + status: + description: MasterStatus defines the observed state of Master + type: object + type: object + version: v100 + versions: + - name: v100 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml new file mode 100644 index 0000000..1b18e14 --- /dev/null +++ b/config/rbac/role.yaml @@ -0,0 +1,28 @@ + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: manager-role +rules: +- apiGroups: + - objectstore.seaweedfs.com + resources: + - masters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - objectstore.seaweedfs.com + resources: + - masters/status + verbs: + - get + - patch + - update