apiVersion: v1 kind: Namespace metadata: labels: control-plane: controller-manager name: k8sasdb-system --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.2.5 creationTimestamp: null name: tables.db.k8sasdb.org spec: group: db.k8sasdb.org names: kind: Table listKind: TableList plural: tables singular: table scope: Namespaced validation: openAPIV3Schema: description: Table is the Schema for the tables 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: TableSpec defines the desired state of Table properties: columns: items: properties: name: type: string type: type: string required: - name - type type: object type: array customGroup: type: string type: object status: description: TableStatus defines the observed state of Table type: object type: object version: v1 versions: - name: v1 served: true storage: true status: acceptedNames: kind: "" plural: "" conditions: [] storedVersions: [] --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: k8sasdb-leader-election-role namespace: k8sasdb-system rules: - apiGroups: - "" resources: - configmaps verbs: - get - list - watch - create - update - patch - delete - apiGroups: - "" resources: - configmaps/status verbs: - get - update - patch - apiGroups: - "" resources: - events verbs: - create --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: creationTimestamp: null name: k8sasdb-manager-role rules: - apiGroups: - db.k8sasdb.org resources: - tables verbs: - create - delete - get - list - patch - update - watch - apiGroups: - db.k8sasdb.org resources: - tables/status verbs: - get - patch - update - apiGroups: - apiextensions.k8s.io resources: - customresourcedefinitions verbs: - create - delete - get - list - patch - update - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: k8sasdb-proxy-role rules: - apiGroups: - authentication.k8s.io resources: - tokenreviews verbs: - create - apiGroups: - authorization.k8s.io resources: - subjectaccessreviews verbs: - create --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRole metadata: name: k8sasdb-metrics-reader rules: - nonResourceURLs: - /metrics verbs: - get --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: k8sasdb-leader-election-rolebinding namespace: k8sasdb-system roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: k8sasdb-leader-election-role subjects: - kind: ServiceAccount name: default namespace: k8sasdb-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: k8sasdb-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: k8sasdb-manager-role subjects: - kind: ServiceAccount name: default namespace: k8sasdb-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: k8sasdb-proxy-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: k8sasdb-proxy-role subjects: - kind: ServiceAccount name: default namespace: k8sasdb-system --- apiVersion: v1 kind: Service metadata: labels: control-plane: controller-manager name: k8sasdb-controller-manager-metrics-service namespace: k8sasdb-system spec: ports: - name: https port: 8443 targetPort: https selector: control-plane: controller-manager --- apiVersion: apps/v1 kind: Deployment metadata: labels: control-plane: controller-manager name: k8sasdb-controller-manager namespace: k8sasdb-system spec: replicas: 1 selector: matchLabels: control-plane: controller-manager template: metadata: labels: control-plane: controller-manager spec: containers: - args: - --secure-listen-address=0.0.0.0:8443 - --upstream=http://127.0.0.1:8080/ - --logtostderr=true - --v=10 image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 name: kube-rbac-proxy ports: - containerPort: 8443 name: https - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election command: - /manager image: hiroyukiosaki/k8sasdb:v0.0.1 name: manager resources: limits: cpu: 100m memory: 30Mi requests: cpu: 100m memory: 20Mi terminationGracePeriodSeconds: 10