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

Commit

Permalink
Add controlplane webhooks for Openstack
Browse files Browse the repository at this point in the history
  • Loading branch information
Svetlina Shopova committed Jun 10, 2019
1 parent 6c6f41e commit 23b2755
Show file tree
Hide file tree
Showing 28 changed files with 1,756 additions and 13 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ start-provider-openstack:
--config-file=./controllers/provider-openstack/example/00-componentconfig.yaml \
--infrastructure-ignore-operation-annotation=$(IGNORE_OPERATION_ANNOTATION) \
--leader-election=$(LEADER_ELECTION) \
--webhook-config-mode=url \
--webhook-config-name=openstack-webhooks \
--webhook-config-host=$(HOSTNAME)

.PHONY: start-provider-alicloud
start-provider-alicloud:
Expand Down
4 changes: 4 additions & 0 deletions controllers/provider-openstack/charts/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ images:
sourceRepository: github.com/gardener/machine-controller-manager
repository: eu.gcr.io/gardener-project/gardener/machine-controller-manager
tag: "0.18.0"
- name: etcd-backup-restore
sourceRepository: github.com/gardener/etcd-backup-restore
repository: eu.gcr.io/gardener-project/gardener/etcdbrctl
tag: "0.6.3"
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ data:
machineImages:
{{ toYaml .Values.config.machineImages | indent 4 }}
{{- end }}
etcd:
storage:
className: {{ .Values.config.etcd.storage.className }}
capacity: {{ .Values.config.etcd.storage.capacity }}
backup:
schedule: {{ .Values.config.etcd.backup.schedule }}
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@ spec:
- /gardener-extension-hyper
- provider-openstack-controller-manager
- --config-file=/etc/gardener-extension-provider-openstack/config/config.yaml
- --controlplane-max-concurrent-reconciles={{ .Values.controllers.controlplane.concurrentSyncs }}
- --infrastructure-max-concurrent-reconciles={{ .Values.controllers.infrastructure.concurrentSyncs }}
- --infrastructure-ignore-operation-annotation={{ .Values.controllers.infrastructure.ignoreOperationAnnotation }}
- --worker-max-concurrent-reconciles={{ .Values.controllers.worker.concurrentSyncs }}
- --webhook-config-mode=service
- --webhook-config-name=openstack-webhooks
- --webhook-config-namespace={{ .Release.Namespace }}
- --webhook-config-service-selectors={"app.kubernetes.io/name":"gardener-extension-provider-openstack","app.kubernetes.io/instance":"{{ .Release.Name }}"}
- --disable-controllers={{ .Values.disableControllers | join "," }}
- --disable-webhooks={{ .Values.disableWebhooks | join "," }}
env:
- name: LEADER_ELECTION_NAMESPACE
valueFrom:
Expand All @@ -44,6 +50,10 @@ spec:
volumeMounts:
- name: config
mountPath: /etc/gardener-extension-provider-openstack/config
ports:
- name: webhook-server
containerPort: 7890
protocol: TCP
volumes:
- name: config
configMap:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: {{ .Values.config.etcd.storage.className }}
provisioner: kubernetes.io/cinder
allowVolumeExpansion: true
parameters: []
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ image:
resources: {}

controllers:
controlplane:
concurrentSyncs: 5
infrastructure:
concurrentSyncs: 5
ignoreOperationAnnotation: false
worker:
concurrentSyncs: 5


disableControllers: []
disableControllers:
- controlplane-controller
disableWebhooks:
- controlplane
- controlplaneexposure
- controlplanebackup

config:
machineImages:
Expand All @@ -22,3 +29,9 @@ config:
cloudProfiles:
- name: eu-de-1
image: coreos-2023.5.0
etcd:
storage:
className: gardener.cloud-fast
capacity: 25Gi
backup:
schedule: "0 */24 * * *"
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ import (
openstackinfrastructure "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/controller/infrastructure"
openstackworker "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/controller/worker"
"github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/openstack"
openstackcontrolplanebackup "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/webhook/controlplanebackup"
openstackcontrolplaneexposure "github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/webhook/controlplaneexposure"
"github.com/gardener/gardener-extensions/pkg/controller"
controllercmd "github.com/gardener/gardener-extensions/pkg/controller/cmd"
"github.com/gardener/gardener-extensions/pkg/controller/infrastructure"

webhookcmd "github.com/gardener/gardener-extensions/pkg/webhook/cmd"
"github.com/spf13/cobra"
"sigs.k8s.io/controller-runtime/pkg/manager"
)
Expand Down Expand Up @@ -63,7 +65,18 @@ func NewControllerManagerCommand(ctx context.Context) *cobra.Command {
MaxConcurrentReconciles: 5,
}

controllerSwitches = openstackcmd.ControllerSwitchOptions()
controllerSwitches = openstackcmd.ControllerSwitchOptions()
webhookSwitches = openstackcmd.WebhookSwitchOptions()
webhookServerOptions = &webhookcmd.ServerOptions{
Port: 7890,
CertDir: "/tmp/cert",
Mode: webhookcmd.ServiceMode,
Name: "webhooks",
Namespace: os.Getenv("WEBHOOK_CONFIG_NAMESPACE"),
ServiceSelectors: "{}",
Host: "localhost",
}
webhookOptions = webhookcmd.NewAddToManagerOptions("openstack-webhooks", webhookServerOptions, webhookSwitches)

aggOption = controllercmd.NewOptionAggregator(
restOpts,
Expand All @@ -72,6 +85,8 @@ func NewControllerManagerCommand(ctx context.Context) *cobra.Command {
controllercmd.PrefixOption("infrastructure-", &infraCtrlOptsUnprefixed),
controllercmd.PrefixOption("worker-", workerCtrlOpts),
controllerSwitches,
configFileOpts,
webhookOptions,
)
)

Expand All @@ -83,10 +98,6 @@ func NewControllerManagerCommand(ctx context.Context) *cobra.Command {
controllercmd.LogErrAndExit(err, "Error completing options")
}

if err := configFileOpts.Complete(); err != nil {
controllercmd.LogErrAndExit(err, "Error completing config options")
}

mgr, err := manager.New(restOpts.Completed().Config, mgrOpts.Completed().Options())
if err != nil {
controllercmd.LogErrAndExit(err, "Could not instantiate manager")
Expand All @@ -101,6 +112,8 @@ func NewControllerManagerCommand(ctx context.Context) *cobra.Command {
}

configFileOpts.Completed().ApplyMachineImages(&openstackworker.DefaultAddOptions.MachineImagesToCloudProfilesMapping)
configFileOpts.Completed().ApplyETCDStorage(&openstackcontrolplaneexposure.DefaultAddOptions.ETCDStorage)
configFileOpts.Completed().ApplyETCDBackup(&openstackcontrolplanebackup.DefaultAddOptions.ETCDBackup)
controlPlaneCtrlOpts.Completed().Apply(&openstackcp.Options)
infraCtrlOpts.Completed().Apply(&openstackinfrastructure.DefaultAddOptions.Controller)
infraReconcileOpts.Completed().Apply(&openstackinfrastructure.DefaultAddOptions.IgnoreOperationAnnotation)
Expand All @@ -110,14 +123,17 @@ func NewControllerManagerCommand(ctx context.Context) *cobra.Command {
controllercmd.LogErrAndExit(err, "Could not add controllers to manager")
}

if err := webhookOptions.Completed().AddToManager(mgr); err != nil {
controllercmd.LogErrAndExit(err, "Could not add webhooks to manager")
}

if err := mgr.Start(ctx.Done()); err != nil {
controllercmd.LogErrAndExit(err, "Error running manager")
}
},
}

aggOption.AddFlags(cmd.Flags())
configFileOpts.AddFlags(cmd.Flags())

return cmd
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ machineImages:
cloudProfiles:
- name: eu-de-1
image: coreos-2023.5.0
etcd:
storage:
className: gardener.cloud-fast
capacity: 25Gi
backup:
schedule: "0 */24 * * *"
8 changes: 8 additions & 0 deletions controllers/provider-openstack/example/30-controlplane.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
apiVersion: v1
kind: Namespace
metadata:
name: shoot--foo--bar # shoot--dev--local
labels:
# backup.gardener.cloud/provider: openstack
# seed.gardener.cloud/provider: openstack
shoot.gardener.cloud/provider: openstack
---
apiVersion: v1
kind: Secret
Expand Down
13 changes: 13 additions & 0 deletions controllers/provider-openstack/example/30-etcd-backup-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
name: etcd-backup
namespace: shoot--foo--bar
type: Opaque
data:
bucketName: YnVja2V0MTIz
authURL: dGVzdFVSTA==
domainName: ZG9tYWluLW9wZW4tc3RhY2s=
tenantName: dGVuYW50LW9wZW4tc3RhY2s=
username: YWRtaW4=
password: YWRtaW4=
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
deployment:
type: helm
providerConfig:
chart: H4sIAAAAAAAAA+0aa2/bOLKf/SsGxn1oD5HkR5zs+bAf3DS7a1zqGHF2i+JwWNASbbORRB1J2fWl/e87JCVZsp3k0noTdKuBAUkUOS8O5yUngi9ZQIXDExpLRfwb78WhoYVw2uuZK8L21dy3u8ftTq9zcqLH293uaecF9A7OyR5IUWgB8EJwru6b99D7bxSS3f0/WxCh3DWJwgPReGj/O9321v73uu2TF9A6EP174Tvff5Kw36iQjMd9WLYbJEmKx5Z76racgC4bAZW+YIkywwP4hYYR+NpKYMYFqAWFn4kIaEwFXKIZTbQZwTizLKAfFZoWrm3EJKJ92DW5xnKX5nMr5juBPec/4L475wek8cD577S6p1vn//j4tFuf/6cAz4MznqwFmy8UvPRfQafV/gdMBmOYnAMebhKbBzKbsZARRcHnUULitQuDMASzTIKgkoolDVy4XjAJOJUCXkPmo03RANJY+wHtJwYJ8fEy4TO1IoLChZ1yBEsXOugpfJooIBJirnAdxyVixSRii83yi+HZ+QgZ0xQanoe/HMMeIgXuzKNBx23BSz2hmb1qvvqnRrHmKURkrYlCisRUIUTGEFLXYqMCYp/CiqmF5cZicTWO9xkOPlUEpxNckODTrDwRiMqYNrBQKul73mq1conh2OVi7mVKk14mq4NcZ6t+jUMqtbb/mzKBEk/XgP4aF5Ap8hqSldmwuaD4TnHN9UowxeL5EchM4RpNwKQSbJqqitJyHlH08gRUG5pAczCB4aQJrweT4eRII3k3vP7l8tdreDe4uhqMrofnE7i8grPL0Zvh9fByhE8/wWD0Hv41HL05Asr0TqI6E6ElQDaZVidajMY1obTCQh5UZEJ9NmM+ihbPUzKnMOcYKWKUCBIqIib1tkpkMNBoQhYxRZQZ2pHLbeCUOe/PdZTSduy6XvFbaLeXv3F8HivB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Vj+viv/uqvZhset7hE8Vv+a971faqihhhpqqKGGGmqooYYaaqihhhpqqKGGGr4X+B8Ff7QvAFAAAA==
values:
image:
tag: 0.7.0-dev
26 changes: 26 additions & 0 deletions controllers/provider-openstack/pkg/apis/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package config

import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand All @@ -27,6 +28,9 @@ type ControllerConfiguration struct {
// MachineImages is the list of machine images that are understood by the controller. It maps
// logical names and versions to OpenStack-specific identifiers.
MachineImages []MachineImage

// ETCD is the etcd configuration.
ETCD ETCD
}

// MachineImage is a mapping from logical names and versions to OpenStack-specific identifiers.
Expand All @@ -46,3 +50,25 @@ type CloudProfileMapping struct {
// Image is the name of the image.
Image string
}

// ETCD is an etcd configuration.
type ETCD struct {
// ETCDStorage is the etcd storage configuration.
Storage ETCDStorage
// ETCDBackup is the etcd backup configuration.
Backup ETCDBackup
}

// ETCDStorage is an etcd storage configuration.
type ETCDStorage struct {
// ClassName is the name of the storage class used in etcd-main volume claims.
ClassName *string
// Capacity is the storage capacity used in etcd-main volume claims.
Capacity *resource.Quantity
}

// ETCDBackup is an etcd backup configuration.
type ETCDBackup struct {
// Schedule is the etcd backup schedule.
Schedule *string
}
29 changes: 29 additions & 0 deletions controllers/provider-openstack/pkg/apis/config/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package v1alpha1

import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand All @@ -27,6 +28,9 @@ type ControllerConfiguration struct {
// MachineImages is the list of machine images that are understood by the controller. It maps
// logical names and versions to OpenStack-specific identifiers.
MachineImages []MachineImage `json:"machineImages,omitempty"`

// ETCD is the etcd configuration.
ETCD ETCD `json:"etcd"`
}

// MachineImage is a mapping from logical names and versions to OpenStack-specific identifiers.
Expand All @@ -46,3 +50,28 @@ type CloudProfileMapping struct {
// Image is the name of the image.
Image string `json:"image"`
}

// ETCD is an etcd configuration.
type ETCD struct {
// ETCDStorage is the etcd storage configuration.
Storage ETCDStorage `json:"storage"`
// ETCDBackup is the etcd backup configuration.
Backup ETCDBackup `json:"backup"`
}

// ETCDStorage is an etcd storage configuration.
type ETCDStorage struct {
// ClassName is the name of the storage class used in etcd-main volume claims.
// +optional
ClassName *string `json:"className,omitempty"`
// Capacity is the storage capacity used in etcd-main volume claims.
// +optional
Capacity *resource.Quantity `json:"capacity,omitempty"`
}

// ETCDBackup is an etcd backup configuration.
type ETCDBackup struct {
// Schedule is the etcd backup schedule.
// +optional
Schedule *string `json:"schedule,omitempty"`
}
Loading

0 comments on commit 23b2755

Please sign in to comment.