-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Lightbits duros storage. (#140)
- Loading branch information
Showing
33 changed files
with
1,174 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 123 additions & 0 deletions
123
charts/internal/control-plane/templates/duros-controller.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{{- if .Values.duros.enabled }} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: duros-controller | ||
namespace: {{ .Release.Namespace }} | ||
--- | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: duros-controller | ||
namespace: {{ .Release.Namespace }} | ||
rules: | ||
- apiGroups: | ||
- storage.metal-stack.io | ||
resources: | ||
- duros | ||
- duros/status | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- create | ||
- get | ||
- update | ||
--- | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: duros-controller | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: duros-controller | ||
subjects: | ||
- kind: ServiceAccount | ||
name: duros-controller | ||
namespace: {{ .Release.Namespace }} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
labels: | ||
app: duros-controller | ||
name: duros-admin | ||
namespace: {{ .Release.Namespace }} | ||
type: Opaque | ||
data: | ||
admin-key: {{ required ".Values.duros.controller.adminKey is required" (b64enc .Values.duros.controller.adminKey) }} | ||
admin-token: {{ required ".Values.duros.controller.adminToken is required" (b64enc .Values.duros.controller.adminToken) }} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: duros-controller | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: duros-controller | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: duros-controller | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: duros-controller | ||
spec: | ||
serviceAccountName: duros-controller | ||
containers: | ||
- name: duros-controller | ||
args: | ||
- -endpoints={{ join "," .Values.duros.controller.endpoints }} | ||
- -namespace={{ .Release.Namespace }} | ||
- -enable-leader-election | ||
- -admin-token=/duros/admin-token | ||
- -admin-key=/duros/admin-key | ||
- -shoot-kubeconfig=/duros/client/kubeconfig | ||
image: {{ index .Values.images "duros-controller" }} | ||
imagePullPolicy: Always | ||
resources: | ||
limits: | ||
cpu: 400m | ||
memory: 100Mi | ||
requests: | ||
cpu: 100m | ||
memory: 20Mi | ||
volumeMounts: | ||
- name: duros-admin | ||
mountPath: /duros | ||
- name: kubeconfig | ||
mountPath: /duros/client | ||
volumes: | ||
- name: duros-admin | ||
secret: | ||
secretName: duros-admin | ||
- name: kubeconfig | ||
secret: | ||
secretName: duros-controller | ||
--- | ||
apiVersion: storage.metal-stack.io/v1 | ||
kind: Duros | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: shoot-default-storage | ||
spec: | ||
metalProjectID: {{ required ".Values.duros.projectID is required" .Values.duros.projectID }} | ||
{{- if .Values.duros.storageClasses }} | ||
storageClasses: | ||
{{ toYaml .Values.duros.storageClasses | indent 4 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
description: Helm chart for Storage CRDs required by the extension-provider-metal | ||
name: crds-storage | ||
version: 0.1.0 |
85 changes: 85 additions & 0 deletions
85
charts/internal/crds-storage/templates/storage.metal-stack.io_duros.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
|
||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.4.0 | ||
creationTimestamp: null | ||
name: duros.storage.metal-stack.io | ||
spec: | ||
group: storage.metal-stack.io | ||
names: | ||
kind: Duros | ||
listKind: DurosList | ||
plural: duros | ||
singular: duros | ||
scope: Namespaced | ||
versions: | ||
- additionalPrinterColumns: | ||
- jsonPath: .spec.metalProjectID | ||
name: ProjectID | ||
type: string | ||
- jsonPath: .spec.storageClasses | ||
name: StorageClasses | ||
type: string | ||
name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: Duros is the Schema for the Duros 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: DurosSpec defines the desired state of Duros | ||
properties: | ||
metalProjectID: | ||
description: MetalProjectID is the projectID of this deployment | ||
type: string | ||
storageClasses: | ||
description: StorageClasses defines what storageclasses should be | ||
deployed | ||
items: | ||
description: StorageClass defines the storageClass parameters | ||
properties: | ||
compression: | ||
type: boolean | ||
name: | ||
type: string | ||
replicas: | ||
type: integer | ||
required: | ||
- compression | ||
- name | ||
- replicas | ||
type: object | ||
type: array | ||
type: object | ||
status: | ||
description: DurosStatus defines the observed state of Duros | ||
properties: | ||
secret: | ||
description: SecretRef to the create JWT Token TODO, this can be used | ||
to detect required key rotation | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: {} | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../crds-storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.