Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #378 from rfranzke/fix/clusterroles
Browse files Browse the repository at this point in the history
Add missing owner reference to MCM cluster role
  • Loading branch information
rfranzke authored Oct 21, 2019
2 parents f795f56 + 1054ea0 commit f60aa26
Show file tree
Hide file tree
Showing 25 changed files with 763 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: extensions.gardener.cloud:{{ .Values.providerName }}:{{ .Release.Namespace }}:machine-controller-manager
ownerReferences:
- apiVersion: v1
kind: Namespace
name: {{ .Release.Namespace }}
uid: {{ .Values.namespace.uid }}
controller: true
blockOwnerDeletion: true
rules:
- apiGroups:
- machine.sapcloud.io
Expand Down
28 changes: 28 additions & 0 deletions controllers/provider-alicloud/example/20-crd-managedresource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: managedresources.resources.gardener.cloud
spec:
group: resources.gardener.cloud
versions:
- name: v1alpha1
served: true
storage: true
version: v1alpha1
scope: Namespaced
names:
plural: managedresources
singular: managedresource
kind: ManagedResource
shortNames:
- mr
additionalPrinterColumns:
- name: Class
type: string
JSONPath: .spec.class
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
subresources:
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: operatingsystemconfigs.extensions.gardener.cloud
spec:
group: extensions.gardener.cloud
versions:
- name: v1alpha1
served: true
storage: true
version: v1alpha1
scope: Namespaced
names:
plural: operatingsystemconfigs
singular: operatingsystemconfig
kind: OperatingSystemConfig
shortNames:
- osc
additionalPrinterColumns:
- name: Type
type: string
description: The type of the operating system configuration.
JSONPath: .spec.type
- name: State
type: string
JSONPath: .status.lastOperation.state
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
subresources:
status: {}
60 changes: 60 additions & 0 deletions controllers/provider-alicloud/example/20-crd-vpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: verticalpodautoscalers.autoscaling.k8s.io
spec:
group: autoscaling.k8s.io
scope: Namespaced
names:
plural: verticalpodautoscalers
singular: verticalpodautoscaler
kind: VerticalPodAutoscaler
shortNames:
- vpa
version: v1beta1
versions:
- name: v1beta1
served: true
storage: false
- name: v1beta2
served: true
storage: true
validation:
# openAPIV3Schema is the schema for validating custom objects.
openAPIV3Schema:
properties:
spec:
required: []
properties:
targetRef:
type: object
updatePolicy:
properties:
updateMode:
type: string
resourcePolicy:
properties:
containerPolicies:
type: array
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: verticalpodautoscalercheckpoints.autoscaling.k8s.io
spec:
group: autoscaling.k8s.io
scope: Namespaced
names:
plural: verticalpodautoscalercheckpoints
singular: verticalpodautoscalercheckpoint
kind: VerticalPodAutoscalerCheckpoint
shortNames:
- vpacheckpoint
version: v1beta1
versions:
- name: v1beta1
served: true
storage: false
- name: v1beta2
served: true
storage: true
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: extensions.gardener.cloud:{{ .Values.providerName }}:{{ .Release.Namespace }}:machine-controller-manager
ownerReferences:
- apiVersion: v1
kind: Namespace
name: {{ .Release.Namespace }}
uid: {{ .Values.namespace.uid }}
controller: true
blockOwnerDeletion: true
rules:
- apiGroups:
- machine.sapcloud.io
Expand Down
28 changes: 28 additions & 0 deletions controllers/provider-aws/example/20-crd-managedresource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: managedresources.resources.gardener.cloud
spec:
group: resources.gardener.cloud
versions:
- name: v1alpha1
served: true
storage: true
version: v1alpha1
scope: Namespaced
names:
plural: managedresources
singular: managedresource
kind: ManagedResource
shortNames:
- mr
additionalPrinterColumns:
- name: Class
type: string
JSONPath: .spec.class
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
subresources:
status: {}
32 changes: 32 additions & 0 deletions controllers/provider-aws/example/20-crd-operatingsystemconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: operatingsystemconfigs.extensions.gardener.cloud
spec:
group: extensions.gardener.cloud
versions:
- name: v1alpha1
served: true
storage: true
version: v1alpha1
scope: Namespaced
names:
plural: operatingsystemconfigs
singular: operatingsystemconfig
kind: OperatingSystemConfig
shortNames:
- osc
additionalPrinterColumns:
- name: Type
type: string
description: The type of the operating system configuration.
JSONPath: .spec.type
- name: State
type: string
JSONPath: .status.lastOperation.state
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
subresources:
status: {}
60 changes: 60 additions & 0 deletions controllers/provider-aws/example/20-crd-vpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: verticalpodautoscalers.autoscaling.k8s.io
spec:
group: autoscaling.k8s.io
scope: Namespaced
names:
plural: verticalpodautoscalers
singular: verticalpodautoscaler
kind: VerticalPodAutoscaler
shortNames:
- vpa
version: v1beta1
versions:
- name: v1beta1
served: true
storage: false
- name: v1beta2
served: true
storage: true
validation:
# openAPIV3Schema is the schema for validating custom objects.
openAPIV3Schema:
properties:
spec:
required: []
properties:
targetRef:
type: object
updatePolicy:
properties:
updateMode:
type: string
resourcePolicy:
properties:
containerPolicies:
type: array
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: verticalpodautoscalercheckpoints.autoscaling.k8s.io
spec:
group: autoscaling.k8s.io
scope: Namespaced
names:
plural: verticalpodautoscalercheckpoints
singular: verticalpodautoscalercheckpoint
kind: VerticalPodAutoscalerCheckpoint
shortNames:
- vpacheckpoint
version: v1beta1
versions:
- name: v1beta1
served: true
storage: false
- name: v1beta2
served: true
storage: true
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: extensions.gardener.cloud:{{ .Values.providerName }}:{{ .Release.Namespace }}:machine-controller-manager
ownerReferences:
- apiVersion: v1
kind: Namespace
name: {{ .Release.Namespace }}
uid: {{ .Values.namespace.uid }}
controller: true
blockOwnerDeletion: true
rules:
- apiGroups:
- machine.sapcloud.io
Expand Down
28 changes: 28 additions & 0 deletions controllers/provider-azure/example/20-crd-managedresource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: managedresources.resources.gardener.cloud
spec:
group: resources.gardener.cloud
versions:
- name: v1alpha1
served: true
storage: true
version: v1alpha1
scope: Namespaced
names:
plural: managedresources
singular: managedresource
kind: ManagedResource
shortNames:
- mr
additionalPrinterColumns:
- name: Class
type: string
JSONPath: .spec.class
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
subresources:
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: operatingsystemconfigs.extensions.gardener.cloud
spec:
group: extensions.gardener.cloud
versions:
- name: v1alpha1
served: true
storage: true
version: v1alpha1
scope: Namespaced
names:
plural: operatingsystemconfigs
singular: operatingsystemconfig
kind: OperatingSystemConfig
shortNames:
- osc
additionalPrinterColumns:
- name: Type
type: string
description: The type of the operating system configuration.
JSONPath: .spec.type
- name: State
type: string
JSONPath: .status.lastOperation.state
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
subresources:
status: {}
Loading

0 comments on commit f60aa26

Please sign in to comment.