зеркало из
1
0
Форкнуть 0
Azure Service Operator allows you to create Azure resources using kubectl
Перейти к файлу
Matthew Christopher f317fde28f
Increase CI timeout (#1673)
2021-08-02 07:57:32 +12:00
.devbots Add needs-triage label automatically (#1671) 2021-07-29 12:26:52 +12:00
.devcontainer Pin golangci-lint version (#1623) 2021-07-06 11:03:53 +12:00
.github Add CodeQL analysis (#1624) 2021-07-06 16:30:37 +12:00
api Update ASO v1 dependencies (#1646) 2021-07-15 13:20:47 -07:00
charts Helm Chart: Added support for using existing secret for Azure Service Operator (#1600) 2021-06-28 08:09:21 -07:00
config Small MySQLServer samples update (#1641) 2021-07-12 17:30:01 -07:00
controllers Support MySQLServer secret rollover (#1654) 2021-07-22 12:16:13 -07:00
devops Fix issue with release scripts (#1509) 2021-05-25 12:15:03 -07:00
docs Design for customer facing resource states (#1614) 2021-07-12 15:41:06 -07:00
examples/demo fix(azure-vote-example): fix apiserverion to RedisCache object 2019-10-15 11:48:41 -06:00
hack Fix missing controller RBAC permissions (#1667) 2021-07-27 15:25:52 -07:00
pkg Support MySQLServer secret rollover (#1654) 2021-07-22 12:16:13 -07:00
reports Implement controller coverage testing 2020-04-13 14:56:41 -07:00
scripts Move kind targets to Taskfile (#1663) 2021-07-27 13:04:16 -07:00
.dockerignore Temporarily remove stderr check in pipeline clean up task (#1575) 2021-06-18 16:08:54 +12:00
.envrc Pr 22 merge (#158) 2019-08-29 17:36:20 -06:00
.gitattributes Move everything to the right place 2021-05-12 03:25:47 +00:00
.gitignore Fix ignored resourcegroup files 2021-05-12 03:50:09 +00:00
.gitmodules Fix submodules 2021-05-12 03:25:51 +00:00
.golangci.yml Add tparallel linter and fix (#1638) 2021-07-12 10:22:27 +12:00
CODE_OF_CONDUCT.md Initial commit 2019-07-17 17:44:12 -07:00
CONTRIBUTING.md updating docs 2020-07-02 10:12:12 -06:00
Dockerfile Update ASO v1 dependencies (#1646) 2021-07-15 13:20:47 -07:00
LICENSE updating the license file 2020-03-02 11:56:09 -07:00
Makefile Add AZURE_TARGET_NAMESPACES to restrict the namespaces the operator watches (#1559) 2021-06-16 08:05:17 -07:00
PROJECT initial working code for app insights api keys 2020-07-08 10:07:42 -06:00
README.md Fix bugs related to secret management and improve documentation (#1358) 2021-02-05 10:05:48 -08:00
SECURITY.md Move everything to the right place 2021-05-12 03:25:47 +00:00
SUPPORT.md Update based on PR feedback 2020-09-10 09:20:23 +12:00
Taskfile.yml Fix webhooks in ASOv2 (#1666) 2021-07-27 15:00:38 -07:00
azure-pipelines.yml Increase CI timeout (#1673) 2021-08-02 07:57:32 +12:00
dev.sh Fix permissions 2021-05-12 03:25:51 +00:00
go.mod Update ASO v1 dependencies (#1646) 2021-07-15 13:20:47 -07:00
go.sum Update ASO v1 dependencies (#1646) 2021-07-15 13:20:47 -07:00
main.go Update ASO v1 dependencies (#1646) 2021-07-15 13:20:47 -07:00
workspace.code-workspace Flattening (#1548) 2021-06-28 11:26:08 +12:00

README.md

Azure Service Operator (for Kubernetes)

Build Status

Note: The API is expected to change (while adhering to semantic versioning). Alpha and Beta resources are generally not recommended for production environments.

The Azure Service Operator helps you provision Azure resources and connect your applications to them from within Kubernetes.

Overview

The Azure Service Operator comprises of:

  • The Custom Resource Definitions (CRDs) for each of the Azure services a Kubernetes user can provision.
  • The Kubernetes controller that watches for requests to create Custom Resources for each of these CRDs and creates them.

The project was built using Kubebuilder.

Curious to see how it all works? Check out our control flow diagrams.

Supported Azure Services

Quickstart

Deploying ASO

Ready to quickly deploy the latest version of Azure Service Operator on your Kubernetes cluster and start exploring? Follow these steps.

  1. Before starting, you must have a Kubernetes cluster (at least version 1.16) created and running. Check your connection and version with:

    $ kubectl version
    Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:41:02Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-30T20:19:45Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
    

    You'll also need to have the Azure CLI installed (>= 2.13.0).

  2. Install cert-manager on the cluster using the following command.

    kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v0.12.0/cert-manager.yaml
    
  3. Install Helm, and add the Helm repo for Azure Service Operator. Please note that the instructions here use Helm 3.

    helm repo add aso https://raw.githubusercontent.com/Azure/azure-service-operator/master/charts
    
  4. Create an Azure Service Principal. You'll need this to grant Azure Service Operator permissions to create resources in your subscription. For more information about other forms of authentication supported by ASO, see the authentication section of the deployment documentation.

    First, set the following environment variables to your Azure Tenant ID and Subscription ID with your values:

    AZURE_TENANT_ID=<your-tenant-id-goes-here>
    AZURE_SUBSCRIPTION_ID=<your-subscription-id-goes-here>
    

    You can find these values by using the Azure CLI:

    az account show
    

    Next, we'll create a service principal with Contributor permissions for your subscription, so ASO can create resources in your subscription on your behalf. Note that the ServicePrincipal you pass to the command below needs to have access to create resources in your subscription. If you'd like to use Managed Identity for authorization instead, check out instructions here.

    az ad sp create-for-rbac -n "azure-service-operator" --role contributor \
        --scopes /subscriptions/$AZURE_SUBSCRIPTION_ID
    

    This should give you output like the following:

    "appId": "xxxxxxxxxx",
    "displayName": "azure-service-operator",
    "name": "http://azure-service-operator",
    "password": "xxxxxxxxxxx",
    "tenant": "xxxxxxxxxxxxx"
    

    Once you have created a service principal, set the following variables to your app ID and password values:

    AZURE_CLIENT_ID=<your-client-id> # This is the appID from the service principal we created.
    AZURE_CLIENT_SECRET=<your-client-secret> # This is the password from the service principal we created.
    
  5. Install the Azure Service Operator on your cluster using Helm.

    helm upgrade --install aso aso/azure-service-operator \
            --create-namespace \
            --namespace=azureoperator-system \
            --set azureSubscriptionID=$AZURE_SUBSCRIPTION_ID \
            --set azureTenantID=$AZURE_TENANT_ID \
            --set azureClientID=$AZURE_CLIENT_ID \
            --set azureClientSecret=$AZURE_CLIENT_SECRET
    

    If you would like to install an older version you can list the available versions:

    helm search repo aso --versions
    

    You should now see the Azure service operator pods running in your cluster, like the below.

    $ kubectl get pods -n azureoperator-system
    NAME                                                READY   STATUS    RESTARTS   AGE
    azureoperator-controller-manager-7dd75bbd97-mk4s9   2/2     Running   0          35s
    

To deploy an Azure service through the operator, check out the set of supported Azure services and the sample YAML files in the config/samples folder to create the resources using the following command.

kubectl apply -f <YAML file>

About the project

This project maintains releases of the Azure Service Operator that you can deploy via a configurable Helm chart.

Please see the FAQ for answers to commonly asked questions about the Azure Service Operator.

Have more questions? Feel free to consult our documentation here.

Azure Service Operator community calls are held monthly on the first Wednesday of the month at 4 PM PST. Recordings are available on our Azure Upstream YouTube channel.

Contributing

The contribution guide covers everything you need to know about how you can contribute to Azure Service Operators. The developer guide will help you onboard as a developer.

Support

Please search open issues here. If your issue isn't already represented, please open a new one. The Azure Service Operator project maintainers will respond to the best of their abilities.

For more information, see SUPPORT.md.

Code of conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.