diff --git a/README.md b/README.md index b05c273..b41b0a6 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,13 @@ Build cloud platform using [Kubernetes Resources Model](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/resource-management.md) +Tools: + +* [Crossplane](https://crossplane.io) +* [ACK](https://aws-controllers-k8s.github.io/community/) +* [Config Connector](https://cloud.google.com/config-connector/docs/overview) +* [Azure Service Operator](https://github.com/Azure/azure-service-operator) + ### Core * Create Kind cluster : diff --git a/hack/config/licence.txt b/hack/config/licence.txt index 3c6f31f..fa92d6f 100644 --- a/hack/config/licence.txt +++ b/hack/config/licence.txt @@ -1,4 +1,4 @@ -Copyright (C) 2021 Nicolas Lamirault +Copyright (C) Nicolas Lamirault Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/hack/kind-config.yaml b/hack/kind-config.yaml index b66da90..8a6de7a 100644 --- a/hack/kind-config.yaml +++ b/hack/kind-config.yaml @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Nicolas Lamirault +# Copyright (C) Nicolas Lamirault # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/krm/crossplane/README.md b/krm/crossplane/README.md new file mode 100644 index 0000000..8e06fed --- /dev/null +++ b/krm/crossplane/README.md @@ -0,0 +1,59 @@ +### KRM / Crossplane + +* Create Kind cluster : + +```shell +> make kind-create ENV=local +``` + +* Install Crossplane: + +```shell +> make crossplane-controlplane ACTION=apply +``` + +### Cloud provider credentials + +* AWS + +```shell +> make crossplane-aws-credentials AWS_ACCESS_KEY=xxxxxx AWS_SECRET_KEY=xxxxxxxxx +``` + +* GCP + +```shell +> make crossplane-gcp-credentials GCP_PROJECT_ID=myproject-prod GCP_SERVICE_ACCOUNT_NAME=kubernetes-krm +``` + +* Azure + +```shell +> make crossplane-azure-credentials AZURE_SUBSCRIPTION_ID=xxxxxxx AZURE_PROJECT_NAME=xxxxxx +``` + +### Crossplane Cloud Provider configuration + +* Choose the cloud provider (`aws`, `gcp` or `azure`) + +```shell +> export CROSSPLANE_CLOUD_PROVIDER=xxx +``` + +* Install Crossplane provider: + +```shell +> make crossplane-provider CLOUD=${CROSSPLANE_CLOUD_PROVIDER} ACTION=apply +``` + +* Setup Crossplane configuration: + +```shell +❯ make crossplane-config CLOUD=${CROSSPLANE_CLOUD_PROVIDER} ACTION=apply +``` + +* Deploy infrastructure: + +```shell +❯ make crossplane-infra CLOUD=${CROSSPLANE_CLOUD_PROVIDER} ACTION=apply +``` diff --git a/krm/aws/config/aws-config.yaml b/krm/crossplane/aws/config/aws-config.yaml similarity index 100% rename from krm/aws/config/aws-config.yaml rename to krm/crossplane/aws/config/aws-config.yaml diff --git a/krm/aws/config/kustomization.yaml b/krm/crossplane/aws/config/kustomization.yaml similarity index 100% rename from krm/aws/config/kustomization.yaml rename to krm/crossplane/aws/config/kustomization.yaml diff --git a/krm/aws/config/labels.yaml b/krm/crossplane/aws/config/labels.yaml similarity index 100% rename from krm/aws/config/labels.yaml rename to krm/crossplane/aws/config/labels.yaml diff --git a/krm/aws/infra/eks.yaml b/krm/crossplane/aws/infra/eks.yaml similarity index 100% rename from krm/aws/infra/eks.yaml rename to krm/crossplane/aws/infra/eks.yaml diff --git a/krm/aws/infra/iam-eks.yaml b/krm/crossplane/aws/infra/iam-eks.yaml similarity index 100% rename from krm/aws/infra/iam-eks.yaml rename to krm/crossplane/aws/infra/iam-eks.yaml diff --git a/krm/aws/infra/internet-gateway.yaml b/krm/crossplane/aws/infra/internet-gateway.yaml similarity index 100% rename from krm/aws/infra/internet-gateway.yaml rename to krm/crossplane/aws/infra/internet-gateway.yaml diff --git a/krm/aws/infra/kustomization.yaml b/krm/crossplane/aws/infra/kustomization.yaml similarity index 100% rename from krm/aws/infra/kustomization.yaml rename to krm/crossplane/aws/infra/kustomization.yaml diff --git a/krm/aws/infra/labels.yaml b/krm/crossplane/aws/infra/labels.yaml similarity index 100% rename from krm/aws/infra/labels.yaml rename to krm/crossplane/aws/infra/labels.yaml diff --git a/krm/aws/infra/nat-gateway.yaml b/krm/crossplane/aws/infra/nat-gateway.yaml similarity index 100% rename from krm/aws/infra/nat-gateway.yaml rename to krm/crossplane/aws/infra/nat-gateway.yaml diff --git a/krm/aws/infra/sg.yaml b/krm/crossplane/aws/infra/sg.yaml similarity index 100% rename from krm/aws/infra/sg.yaml rename to krm/crossplane/aws/infra/sg.yaml diff --git a/krm/aws/infra/subnets.yaml b/krm/crossplane/aws/infra/subnets.yaml similarity index 100% rename from krm/aws/infra/subnets.yaml rename to krm/crossplane/aws/infra/subnets.yaml diff --git a/krm/aws/infra/vpc.yaml b/krm/crossplane/aws/infra/vpc.yaml similarity index 100% rename from krm/aws/infra/vpc.yaml rename to krm/crossplane/aws/infra/vpc.yaml diff --git a/krm/aws/provider/aws-controller-config.yaml b/krm/crossplane/aws/provider/aws-controller-config.yaml similarity index 100% rename from krm/aws/provider/aws-controller-config.yaml rename to krm/crossplane/aws/provider/aws-controller-config.yaml diff --git a/krm/aws/provider/aws-provider.yaml b/krm/crossplane/aws/provider/aws-provider.yaml similarity index 100% rename from krm/aws/provider/aws-provider.yaml rename to krm/crossplane/aws/provider/aws-provider.yaml diff --git a/krm/aws/provider/kustomization.yaml b/krm/crossplane/aws/provider/kustomization.yaml similarity index 100% rename from krm/aws/provider/kustomization.yaml rename to krm/crossplane/aws/provider/kustomization.yaml diff --git a/krm/aws/provider/labels.yaml b/krm/crossplane/aws/provider/labels.yaml similarity index 100% rename from krm/aws/provider/labels.yaml rename to krm/crossplane/aws/provider/labels.yaml diff --git a/krm/azure/config/azure-config.yaml b/krm/crossplane/azure/config/azure-config.yaml similarity index 100% rename from krm/azure/config/azure-config.yaml rename to krm/crossplane/azure/config/azure-config.yaml diff --git a/krm/azure/config/kustomization.yaml b/krm/crossplane/azure/config/kustomization.yaml similarity index 100% rename from krm/azure/config/kustomization.yaml rename to krm/crossplane/azure/config/kustomization.yaml diff --git a/krm/azure/config/labels.yaml b/krm/crossplane/azure/config/labels.yaml similarity index 100% rename from krm/azure/config/labels.yaml rename to krm/crossplane/azure/config/labels.yaml diff --git a/krm/azure/infra/account.yaml b/krm/crossplane/azure/infra/account.yaml similarity index 100% rename from krm/azure/infra/account.yaml rename to krm/crossplane/azure/infra/account.yaml diff --git a/krm/azure/infra/aks.yaml b/krm/crossplane/azure/infra/aks.yaml similarity index 100% rename from krm/azure/infra/aks.yaml rename to krm/crossplane/azure/infra/aks.yaml diff --git a/krm/azure/infra/container.yaml b/krm/crossplane/azure/infra/container.yaml similarity index 100% rename from krm/azure/infra/container.yaml rename to krm/crossplane/azure/infra/container.yaml diff --git a/krm/azure/infra/kustomization.yaml b/krm/crossplane/azure/infra/kustomization.yaml similarity index 100% rename from krm/azure/infra/kustomization.yaml rename to krm/crossplane/azure/infra/kustomization.yaml diff --git a/krm/azure/infra/labels.yaml b/krm/crossplane/azure/infra/labels.yaml similarity index 100% rename from krm/azure/infra/labels.yaml rename to krm/crossplane/azure/infra/labels.yaml diff --git a/krm/azure/infra/mysql.yaml b/krm/crossplane/azure/infra/mysql.yaml similarity index 100% rename from krm/azure/infra/mysql.yaml rename to krm/crossplane/azure/infra/mysql.yaml diff --git a/krm/azure/infra/postgresql.yaml b/krm/crossplane/azure/infra/postgresql.yaml similarity index 100% rename from krm/azure/infra/postgresql.yaml rename to krm/crossplane/azure/infra/postgresql.yaml diff --git a/krm/azure/infra/redis.yaml b/krm/crossplane/azure/infra/redis.yaml similarity index 100% rename from krm/azure/infra/redis.yaml rename to krm/crossplane/azure/infra/redis.yaml diff --git a/krm/azure/infra/resourcegroup.yaml b/krm/crossplane/azure/infra/resourcegroup.yaml similarity index 100% rename from krm/azure/infra/resourcegroup.yaml rename to krm/crossplane/azure/infra/resourcegroup.yaml diff --git a/krm/azure/infra/subnet.yaml b/krm/crossplane/azure/infra/subnet.yaml similarity index 100% rename from krm/azure/infra/subnet.yaml rename to krm/crossplane/azure/infra/subnet.yaml diff --git a/krm/azure/infra/vnet.yaml b/krm/crossplane/azure/infra/vnet.yaml similarity index 100% rename from krm/azure/infra/vnet.yaml rename to krm/crossplane/azure/infra/vnet.yaml diff --git a/krm/azure/provider/azure-controller-config.yaml b/krm/crossplane/azure/provider/azure-controller-config.yaml similarity index 100% rename from krm/azure/provider/azure-controller-config.yaml rename to krm/crossplane/azure/provider/azure-controller-config.yaml diff --git a/krm/azure/provider/azure-provider.yaml b/krm/crossplane/azure/provider/azure-provider.yaml similarity index 100% rename from krm/azure/provider/azure-provider.yaml rename to krm/crossplane/azure/provider/azure-provider.yaml diff --git a/krm/azure/provider/kustomization.yaml b/krm/crossplane/azure/provider/kustomization.yaml similarity index 100% rename from krm/azure/provider/kustomization.yaml rename to krm/crossplane/azure/provider/kustomization.yaml diff --git a/krm/azure/provider/labels.yaml b/krm/crossplane/azure/provider/labels.yaml similarity index 100% rename from krm/azure/provider/labels.yaml rename to krm/crossplane/azure/provider/labels.yaml diff --git a/krm/civo/config.yaml b/krm/crossplane/civo/config.yaml similarity index 100% rename from krm/civo/config.yaml rename to krm/crossplane/civo/config.yaml diff --git a/krm/civo/controller-config.yaml b/krm/crossplane/civo/controller-config.yaml similarity index 100% rename from krm/civo/controller-config.yaml rename to krm/crossplane/civo/controller-config.yaml diff --git a/krm/civo/k8s.yaml b/krm/crossplane/civo/k8s.yaml similarity index 100% rename from krm/civo/k8s.yaml rename to krm/crossplane/civo/k8s.yaml diff --git a/krm/civo/kustomization.yaml b/krm/crossplane/civo/kustomization.yaml similarity index 100% rename from krm/civo/kustomization.yaml rename to krm/crossplane/civo/kustomization.yaml diff --git a/krm/civo/labels.yaml b/krm/crossplane/civo/labels.yaml similarity index 100% rename from krm/civo/labels.yaml rename to krm/crossplane/civo/labels.yaml diff --git a/krm/civo/provider.yaml b/krm/crossplane/civo/provider.yaml similarity index 100% rename from krm/civo/provider.yaml rename to krm/crossplane/civo/provider.yaml diff --git a/krm/gcp/config/gcp-config.yaml b/krm/crossplane/gcp/config/gcp-config.yaml similarity index 100% rename from krm/gcp/config/gcp-config.yaml rename to krm/crossplane/gcp/config/gcp-config.yaml diff --git a/krm/gcp/config/kustomization.yaml b/krm/crossplane/gcp/config/kustomization.yaml similarity index 100% rename from krm/gcp/config/kustomization.yaml rename to krm/crossplane/gcp/config/kustomization.yaml diff --git a/krm/gcp/config/labels.yaml b/krm/crossplane/gcp/config/labels.yaml similarity index 100% rename from krm/gcp/config/labels.yaml rename to krm/crossplane/gcp/config/labels.yaml diff --git a/krm/gcp/infra/bucket.yaml b/krm/crossplane/gcp/infra/bucket.yaml similarity index 100% rename from krm/gcp/infra/bucket.yaml rename to krm/crossplane/gcp/infra/bucket.yaml diff --git a/krm/gcp/infra/cloudsql.yaml b/krm/crossplane/gcp/infra/cloudsql.yaml similarity index 100% rename from krm/gcp/infra/cloudsql.yaml rename to krm/crossplane/gcp/infra/cloudsql.yaml diff --git a/krm/gcp/infra/firewall.yaml b/krm/crossplane/gcp/infra/firewall.yaml similarity index 100% rename from krm/gcp/infra/firewall.yaml rename to krm/crossplane/gcp/infra/firewall.yaml diff --git a/krm/gcp/infra/gke.yaml b/krm/crossplane/gcp/infra/gke.yaml similarity index 100% rename from krm/gcp/infra/gke.yaml rename to krm/crossplane/gcp/infra/gke.yaml diff --git a/krm/gcp/infra/iam.yaml b/krm/crossplane/gcp/infra/iam.yaml similarity index 100% rename from krm/gcp/infra/iam.yaml rename to krm/crossplane/gcp/infra/iam.yaml diff --git a/krm/gcp/infra/kustomization.yaml b/krm/crossplane/gcp/infra/kustomization.yaml similarity index 100% rename from krm/gcp/infra/kustomization.yaml rename to krm/crossplane/gcp/infra/kustomization.yaml diff --git a/krm/gcp/infra/labels.yaml b/krm/crossplane/gcp/infra/labels.yaml similarity index 100% rename from krm/gcp/infra/labels.yaml rename to krm/crossplane/gcp/infra/labels.yaml diff --git a/krm/gcp/infra/memorystore.yaml b/krm/crossplane/gcp/infra/memorystore.yaml similarity index 100% rename from krm/gcp/infra/memorystore.yaml rename to krm/crossplane/gcp/infra/memorystore.yaml diff --git a/krm/gcp/infra/network.yaml b/krm/crossplane/gcp/infra/network.yaml similarity index 100% rename from krm/gcp/infra/network.yaml rename to krm/crossplane/gcp/infra/network.yaml diff --git a/krm/gcp/infra/pubsub.yaml b/krm/crossplane/gcp/infra/pubsub.yaml similarity index 100% rename from krm/gcp/infra/pubsub.yaml rename to krm/crossplane/gcp/infra/pubsub.yaml diff --git a/krm/gcp/infra/subnetwork.yaml b/krm/crossplane/gcp/infra/subnetwork.yaml similarity index 100% rename from krm/gcp/infra/subnetwork.yaml rename to krm/crossplane/gcp/infra/subnetwork.yaml diff --git a/krm/gcp/provider/gcp-controller-config.yaml b/krm/crossplane/gcp/provider/gcp-controller-config.yaml similarity index 100% rename from krm/gcp/provider/gcp-controller-config.yaml rename to krm/crossplane/gcp/provider/gcp-controller-config.yaml diff --git a/krm/gcp/provider/gcp-provider.yaml b/krm/crossplane/gcp/provider/gcp-provider.yaml similarity index 100% rename from krm/gcp/provider/gcp-provider.yaml rename to krm/crossplane/gcp/provider/gcp-provider.yaml diff --git a/krm/gcp/provider/kustomization.yaml b/krm/crossplane/gcp/provider/kustomization.yaml similarity index 100% rename from krm/gcp/provider/kustomization.yaml rename to krm/crossplane/gcp/provider/kustomization.yaml diff --git a/krm/gcp/provider/labels.yaml b/krm/crossplane/gcp/provider/labels.yaml similarity index 100% rename from krm/gcp/provider/labels.yaml rename to krm/crossplane/gcp/provider/labels.yaml