зеркало из
1
0
Форкнуть 0
The purpose of this Kubernetes controller is to sync ARM VM/VMSS tags with node labels.
Перейти к файлу
Shoshana Malfatto b4eb38283d
Revert "Make GitHub Actions E2E more automated (#57)" (#60)
This reverts commit 244d9b19b1.
2020-01-08 14:53:33 -08:00
.github/workflows Revert "Make GitHub Actions E2E more automated (#57)" (#60) 2020-01-08 14:53:33 -08:00
azure clean up controller package (#40) 2019-10-09 10:49:40 -07:00
config Revert "Make GitHub Actions E2E more automated (#57)" (#60) 2020-01-08 14:53:33 -08:00
controller Changed function names to work with new options package name (#42) 2019-10-09 11:35:53 -07:00
docs Revert "Make GitHub Actions E2E more automated (#57)" (#60) 2020-01-08 14:53:33 -08:00
hack node-label-operator code 2019-09-18 11:56:41 -07:00
labelsync Changed function names to work with new options package name (#42) 2019-10-09 11:35:53 -07:00
tests Revert "Make GitHub Actions E2E more automated (#57)" (#60) 2020-01-08 14:53:33 -08:00
.gitignore Revert "Make GitHub Actions E2E more automated (#57)" (#60) 2020-01-08 14:53:33 -08:00
.goreleaser.yml Changed owner in .goreleaser.yml (#46) 2019-10-09 13:57:48 -07:00
CODE_OF_CONDUCT.md Initial commit 2019-09-03 15:06:24 -07:00
Dockerfile clean up controller package (#40) 2019-10-09 10:49:40 -07:00
LICENSE Initial commit 2019-09-03 15:06:25 -07:00
Makefile Revert "Make GitHub Actions E2E more automated (#57)" (#60) 2020-01-08 14:53:33 -08:00
PROJECT node-label-operator code 2019-09-18 11:56:41 -07:00
README.md Documentation - quickstart, tutorial, dev instructions (#38) 2019-10-08 10:25:53 -07:00
SECURITY.md Initial commit 2019-09-03 15:06:26 -07:00
go.mod Add goreleaser.yml (#45) 2019-10-09 13:36:34 -07:00
go.sum Add goreleaser.yml (#45) 2019-10-09 13:36:34 -07:00
main.go get last update time from last-update node label (#21) 2019-09-24 10:12:31 -07:00

README.md

Node Label Operator

Overview

The purpose of this Kubernetes controller is to sync ARM VM/VMSS tags and node labels in an AKS cluster.

Installation

Prerequisites

Getting Started

  1. Create a cluster.

Create a cluster using either AKS or aks-engine, if you don't already have one ready to go.

  1. Create a managed service identity if you don't have one. If you have an AKS cluster, then you will use the MC_ resource group.
export AZURE_RESOURCE_GROUP=<resource-group>
export AZURE_IDENTITY_LOCATION=~/identity.json
export AZURE_IDENTITY=<identity-name>

az identity create -g $AZURE_RESOURCE_GROUP -n ${AZURE_IDENTITY} -o json > $AZURE_IDENTITY_LOCATION

export AZURE_IDENTITY_RESOURCE_ID=$(cat ${AZURE_IDENTITY_LOCATION} | jq -r .id)
export AZURE_IDENTITY_CLIENT_ID=$(cat ${AZURE_IDENTITY_LOCATION} | jq -r .clientId)
export AZURE_IDENTITY_PRINCIPAL_ID=$(cat ${AZURE_IDENTITY_LOCATION} | jq -r .principalId)
  1. Create roles for identity.
az role assignment create --role "Managed Identity Operator" --assignee $AZURE_IDENTITY_PRINCIPAL_ID --scope $AZURE_IDENTITY_RESOURCE_ID
az role assignment create --role "Contributor" --assignee $AZURE_IDENTITY_PRINCIPAL_ID --scope /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${AZURE_RESOURCE_GROUP}
  1. Create k8s resources, including controller deployment.

Clone this repository. From the root directory of the repository, run:

cat config/quickstart/quickstart.yaml | envsubst | kubectl apply -f - 

To see the tags on your VM or VMSS synced as labels on nodes: kubectl get nodes --show-labels.

Other Pages

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

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.