This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added aci connector addon * added example json * linting changes * disabled by default * linting changes * added readme * fix test bools * review changes * add KubernetesAddon.Config key/val defaults * defaults for config * handling nil * KubernetesAddons.Config conversion * update example api model readme * update default config * update example api model * removing china cloud changes
- Loading branch information
1 parent
8fde49b
commit 6d1a3c2
Showing
19 changed files
with
1,072 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# ACI Connector Add-on | ||
|
||
|
||
This is the ACI Connector add-on. Add this add-on to your json file as shown below to automatically enable ACI Connector in your new Kubernetes cluster. | ||
|
||
``` | ||
{ | ||
"apiVersion": "vlabs", | ||
"properties": { | ||
"orchestratorProfile": { | ||
"orchestratorType": "Kubernetes", | ||
"kubernetesConfig": { | ||
"addons": [ | ||
{ | ||
"name": "aci-connector", | ||
"enabled" : true, | ||
"config": { | ||
"clientId": "", | ||
"clientKey": "", | ||
"tenantId": "", | ||
"subscriptionId": "", | ||
"resourceGroup": "", | ||
"region": "" | ||
}, | ||
"containers": [ | ||
{ | ||
"name": "aci-connector", | ||
"cpuRequests": "50m", | ||
"memoryRequests": "150Mi", | ||
"cpuLimits": "50m", | ||
"memoryLimits": "150Mi" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"masterProfile": { | ||
"count": 1, | ||
"dnsPrefix": "", | ||
"vmSize": "Standard_DS2_v2", | ||
}, | ||
"agentPoolProfiles": [ | ||
{ | ||
"name": "agentpool", | ||
"count": 3, | ||
"vmSize": "Standard_DS2_v2", | ||
"availabilityProfile": "AvailabilitySet" | ||
} | ||
], | ||
"linuxProfile": { | ||
"adminUsername": "azureuser", | ||
"ssh": { | ||
"publicKeys": [ | ||
{ | ||
"keyData": "" | ||
} | ||
] | ||
} | ||
}, | ||
"servicePrincipalProfile": { | ||
"clientId": "", | ||
"secret": "" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
You can validate that the add-on is running as expected with the following commands: | ||
|
||
Make sure to create resource group: | ||
``` | ||
az group create \ | ||
--name "[resource group name]" \ | ||
--location "[location]" | ||
``` | ||
|
||
You should see ACI Connector as running after running: | ||
``` | ||
$ kubectl get pods -n kube-system | ||
``` | ||
|
||
You should see ACI Connector node after running: | ||
``` | ||
$ kubectl get nodes | ||
``` | ||
|
||
Follow the README at https://github.com/Azure/aci-connector-k8s for examples. | ||
|
||
# Configuration | ||
|Name|Required|Description|Default Value| | ||
|---|---|---|---| | ||
|clientId|yes|your client id|| | ||
|clientKey|yes|your client key|| | ||
|tenantId|yes|your tenant id|| | ||
|resourceGroup|yes|your resource group|| | ||
|region|yes|Azure region|"westus"| | ||
|name|no|container name|"aci-connector"| | ||
|image|no|image|"microsoft/aci-connector-k8s:latest"| | ||
|cpuRequests|no|cpu requests for the container|"50m"| | ||
|memoryRequests|no|memory requests for the container|"150Mi"| | ||
|cpuLimits|no|cpu limits for the container|"50m"| | ||
|memoryLimits|no|memory limits for the container|"150Mi"| | ||
|
||
|
||
# Supported Orchestrators | ||
Kubernetes |
61 changes: 61 additions & 0 deletions
61
examples/addons/aci-connector/kubernetes-aci-connector.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"apiVersion": "vlabs", | ||
"properties": { | ||
"orchestratorProfile": { | ||
"orchestratorType": "Kubernetes", | ||
"kubernetesConfig": { | ||
"addons": [ | ||
{ | ||
"name": "aci-connector", | ||
"enabled" : true, | ||
"config": { | ||
"clientId": "", | ||
"clientKey": "", | ||
"tenantId": "", | ||
"subscriptionId": "", | ||
"resourceGroup": "", | ||
"region": "eastus" | ||
}, | ||
"containers": [ | ||
{ | ||
"name": "aci-connector", | ||
"image": "microsoft/aci-connector-k8s:latest", | ||
"cpuRequests": "50m", | ||
"memoryRequests": "150Mi", | ||
"cpuLimits": "50m", | ||
"memoryLimits": "150Mi" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"masterProfile": { | ||
"count": 1, | ||
"dnsPrefix": "", | ||
"vmSize": "Standard_DS2_v2" | ||
}, | ||
"agentPoolProfiles": [ | ||
{ | ||
"name": "agentpool", | ||
"count": 3, | ||
"vmSize": "Standard_DS2_v2", | ||
"availabilityProfile": "AvailabilitySet" | ||
} | ||
], | ||
"linuxProfile": { | ||
"adminUsername": "azureuser", | ||
"ssh": { | ||
"publicKeys": [ | ||
{ | ||
"keyData": "" | ||
} | ||
] | ||
} | ||
}, | ||
"servicePrincipalProfile": { | ||
"clientId": "", | ||
"secret": "" | ||
} | ||
} | ||
} |
91 changes: 91 additions & 0 deletions
91
parts/kubernetesmasteraddons-aci-connector-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: aci-connector | ||
namespace: kube-system | ||
labels: | ||
kubernetes.io/cluster-service: "true" | ||
addonmanager.kubernetes.io/mode: "EnsureExists" | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
name: aci-connector | ||
labels: | ||
kubernetes.io/cluster-service: "true" | ||
addonmanager.kubernetes.io/mode: "EnsureExists" | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
- pods | ||
- services | ||
- endpoints | ||
- events | ||
- secrets | ||
- nodes | ||
- nodes/status | ||
- pods/status | ||
verbs: | ||
- "*" | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: aci-connector | ||
labels: | ||
kubernetes.io/cluster-service: "true" | ||
addonmanager.kubernetes.io/mode: "EnsureExists" | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: aci-connector | ||
subjects: | ||
- kind: ServiceAccount | ||
name: aci-connector | ||
namespace: kube-system | ||
--- | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: aci-connector | ||
namespace: kube-system | ||
labels: | ||
app: aci-connector | ||
name: aci-connector | ||
kubernetes.io/cluster-service: "true" | ||
addonmanager.kubernetes.io/mode: "EnsureExists" | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: aci-connector | ||
spec: | ||
serviceAccountName: aci-connector | ||
containers: | ||
- name: aci-connector | ||
image: <kubernetesACIConnectorSpec> | ||
env: | ||
- name: AZURE_CLIENT_ID | ||
value: <kubernetesACIConnectorClientId> | ||
- name: AZURE_CLIENT_KEY | ||
value: <kubernetesACIConnectorClientKey> | ||
- name: AZURE_TENANT_ID | ||
value: <kubernetesACIConnectorTenantId> | ||
- name: AZURE_SUBSCRIPTION_ID | ||
value: <kubernetesACIConnectorSubscriptionId> | ||
- name: ACI_RESOURCE_GROUP | ||
value: <kubernetesACIConnectorResourceGroup> | ||
- name: ACI_REGION | ||
value: <kubernetesACIConnectorRegion> | ||
resources: | ||
requests: | ||
cpu: <kubernetesACIConnectorCPURequests> | ||
memory: <kubernetesACIConnectorMemoryRequests> | ||
limits: | ||
cpu: <kubernetesACIConnectorCPULimit> | ||
memory: <kubernetesACIConnectorMemoryLimit> | ||
nodeSelector: | ||
beta.kubernetes.io/os: linux |
89 changes: 89 additions & 0 deletions
89
parts/kubernetesmasteraddons-aci-connector-deployment1.5.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: aci-connector | ||
namespace: kube-system | ||
labels: | ||
kubernetes.io/cluster-service: "true" | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1alpha1 | ||
kind: ClusterRole | ||
metadata: | ||
name: aci-connector | ||
labels: | ||
app: aci-connector | ||
kubernetes.io/cluster-service: "true" | ||
addonmanager.kubernetes.io/mode: "EnsureExists" | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
- pods | ||
- services | ||
- endpoints | ||
- events | ||
- secrets | ||
- nodes | ||
- nodes/status | ||
- pods/status | ||
verbs: | ||
- "*" | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1alpha1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: aci-connector | ||
labels: | ||
kubernetes.io/cluster-service: "true" | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: cluster-admin | ||
subjects: | ||
- kind: ServiceAccount | ||
name: aci-connector | ||
namespace: kube-system | ||
--- | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: aci-connector | ||
namespace: kube-system | ||
labels: | ||
app: aci-connector | ||
name: aci-connector | ||
kubernetes.io/cluster-service: "true" | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: aci-connector | ||
spec: | ||
serviceAccountName: aci-connector | ||
containers: | ||
- name: aci-connector | ||
image: <kubernetesACIConnectorSpec> | ||
env: | ||
- name: AZURE_CLIENT_ID | ||
value: <kubernetesACIConnectorClientId> | ||
- name: AZURE_CLIENT_KEY | ||
value: <kubernetesACIConnectorClientKey> | ||
- name: AZURE_TENANT_ID | ||
value: <kubernetesACIConnectorTenantId> | ||
- name: AZURE_SUBSCRIPTION_ID | ||
value: <kubernetesACIConnectorSubscriptionId> | ||
- name: ACI_RESOURCE_GROUP | ||
value: <kubernetesACIConnectorResourceGroup> | ||
- name: ACI_REGION | ||
value: <kubernetesACIConnectorRegion> | ||
resources: | ||
requests: | ||
cpu: <kubernetesACIConnectorCPURequests> | ||
memory: <kubernetesACIConnectorMemoryRequests> | ||
limits: | ||
cpu: <kubernetesACIConnectorCPULimit> | ||
memory: <kubernetesACIConnectorMemoryLimit> | ||
nodeSelector: | ||
beta.kubernetes.io/os: linux |
Oops, something went wrong.