
# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Adds namespace to all resources.
namespace: azure-provider-system

# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
namePrefix: azure-provider-

# Labels to add to all resources and selectors.
#commonLabels:
#  someName: someValue

# Each entry in this list must resolve to an existing
# resource definition in YAML.  These are the resource
# 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

patches:
  - rbac_role_binding_patch.yaml

patchesStrategicMerge:
- ../../cmd/clusterctl/examples/azure/out/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"
