Skip to content

Commit

Permalink
fix: config structure to support Kustomize 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
serbrech committed Mar 20, 2019
1 parent 3370274 commit ec1e9d0
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 21 deletions.
5 changes: 5 additions & 0 deletions config/crds/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resources:
- azureprovider_v1alpha1_azureclusterproviderspec.yaml
- azureprovider_v1alpha1_azureclusterproviderstatus.yaml
- azureprovider_v1alpha1_azuremachineproviderspec.yaml
- azureprovider_v1alpha1_azuremachineproviderstatus.yaml
4 changes: 4 additions & 0 deletions config/default/azure.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
AZURE_SUBSCRIPTION_ID
AZURE_TENANT_ID
AZURE_CLIENT_ID
AZURE_CLIENT_SECRET
12 changes: 12 additions & 0 deletions config/default/azure_manager_image_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: controller-manager
namespace: system
spec:
template:
spec:
containers:
- image: quay.io/k8s/cluster-api-azure-controller:0.1.0-alpha.3
imagePullPolicy: IfNotPresent
name: manager
29 changes: 8 additions & 21 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,18 @@ namePrefix: azure-provider-
# files that kustomize reads, modifies and emits as a
# YAML string, with resources separated by document
# markers ("---").
resources:
- ../crds/azureprovider_v1alpha1_azureclusterproviderspec.yaml
- ../crds/azureprovider_v1alpha1_azureclusterproviderstatus.yaml
- ../crds/azureprovider_v1alpha1_azuremachineproviderspec.yaml
- ../crds/azureprovider_v1alpha1_azuremachineproviderstatus.yaml
- ../rbac/rbac_role.yaml
- ../rbac/rbac_role_binding.yaml
- ../manager/manager.yaml
bases:
- ../rbac
- ../manager
- ../crds

patches:
- rbac_role_binding_patch.yaml
- rbac_role_binding_patch.yaml

patchesStrategicMerge:
- ../../cmd/clusterctl/examples/azure/out/azure_manager_image_patch.yaml
- azure_manager_image_patch.yaml

secretGenerator:
- name: azure-controller-secrets
commands:
subscription-id: "printf $AZURE_SUBSCRIPTION_ID"
tenant-id: "printf $AZURE_TENANT_ID"
client-id: "printf $AZURE_CLIENT_ID"
client-secret: "printf $AZURE_CLIENT_SECRET"
type: Opaque
# TODO: Investigate Azure bootstrap credentials
# - name: manager-bootstrap-credentials
# type: Opaque
# commands:
# credentials: "cat ../../cmd/clusterctl/examples/azure/out/credentials"
env: azure.env
type: Opaque
2 changes: 2 additions & 0 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- manager.yaml
9 changes: 9 additions & 0 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
resources:
- rbac_role.yaml
- rbac_role_binding.yaml
# Comment the following 3 lines if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
# - auth_proxy_service.yaml
# - auth_proxy_role.yaml
# - auth_proxy_role_binding.yaml

0 comments on commit ec1e9d0

Please sign in to comment.