Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/config/draftconfig_template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ var validVariableKinds = map[string]bool{
"scalingResourceType": true,
"scalingResourceUtilization": true,
"resourceLimit": true,
"workflowAuthType": true,
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ env:
CHART_OVERRIDES: replicas:2
NAMESPACE: default
ENABLENAMESPACECREATION: false
AUTH_TYPE: SERVICE_PRINCIPAL

jobs:
buildImage:
Expand All @@ -68,11 +69,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Builds and pushes an image up to your Azure Container Registry
- name: Build and push image to ACR
Expand All @@ -91,11 +93,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Use kubelogin to configure your kubeconfig for Azure auth
- name: Set up kubelogin for non-interactive login
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ env:
BUILD_CONTEXT_PATH: test
NAMESPACE: default
ENABLENAMESPACECREATION: false
AUTH_TYPE: SERVICE_PRINCIPAL

jobs:
buildImage:
Expand All @@ -67,11 +68,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Builds and pushes an image up to your Azure Container Registry
- name: Build and push image to ACR
Expand All @@ -90,11 +92,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Use kubelogin to configure your kubeconfig for Azure auth
- name: Set up kubelogin for non-interactive login
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ env:
DOCKER_FILE: ./Dockerfile
BUILD_CONTEXT_PATH: test
NAMESPACE: default
AUTH_TYPE: SERVICE_PRINCIPAL

jobs:
buildImage:
Expand All @@ -61,11 +62,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Builds and pushes an image up to your Azure Container Registry
- name: Build and push image to ACR
Expand All @@ -84,11 +86,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Use kubelogin to configure your kubeconfig for Azure auth
- name: Set up kubelogin for non-interactive login
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ env:
CHART_OVERRIDES: {{ .Config.GetVariableValue "CHARTOVERRIDES" }}
NAMESPACE: {{ .Config.GetVariableValue "NAMESPACE" }}
ENABLENAMESPACECREATION: {{ .Config.GetVariableValue "ENABLENAMESPACECREATION" }}
AUTH_TYPE: {{ .Config.GetVariableValue "AZURELOGINAUTHTYPE" }}
{{`
jobs:
buildImage:
Expand All @@ -68,11 +69,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Builds and pushes an image up to your Azure Container Registry
- name: Build and push image to ACR
Expand All @@ -91,11 +93,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Use kubelogin to configure your kubeconfig for Azure auth
- name: Set up kubelogin for non-interactive login
Expand Down
11 changes: 11 additions & 0 deletions template/workflows/helm/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,14 @@ variables:
value: "Microsoft.ContainerService/managedClusters"
description: "ARM resource type for cluster"
versions: ">=0.0.1"
- name: "AZURELOGINAUTHTYPE"
type: "string"
kind: "workflowAuthType"
default:
disablePrompt: true
value: "SERVICE_PRINCIPAL"
allowedValues:
- "SERVICE_PRINCIPAL"
- "IDENTITY"
description: "the authentication type to use for the azure/login github workflow"
versions: ">=0.0.1"
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ env:
BUILD_CONTEXT_PATH: {{ .Config.GetVariableValue "BUILDCONTEXTPATH" }}
NAMESPACE: {{ .Config.GetVariableValue "NAMESPACE" }}
ENABLENAMESPACECREATION: {{ .Config.GetVariableValue "ENABLENAMESPACECREATION" }}
AUTH_TYPE: {{ .Config.GetVariableValue "AZURELOGINAUTHTYPE" }}
{{`
jobs:
buildImage:
Expand All @@ -67,11 +68,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Builds and pushes an image up to your Azure Container Registry
- name: Build and push image to ACR
Expand All @@ -90,11 +92,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Use kubelogin to configure your kubeconfig for Azure auth
- name: Set up kubelogin for non-interactive login
Expand Down
11 changes: 11 additions & 0 deletions template/workflows/kustomize/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,14 @@ variables:
value: "Microsoft.ContainerService/managedClusters"
description: "ARM resource type for cluster"
versions: ">=0.0.1"
- name: "AZURELOGINAUTHTYPE"
type: "string"
kind: "workflowAuthType"
default:
disablePrompt: true
value: "SERVICE_PRINCIPAL"
allowedValues:
- "SERVICE_PRINCIPAL"
- "IDENTITY"
description: "the authentication type to use for the azure/login github workflow"
versions: ">=0.0.1"
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ env:
BUILD_CONTEXT_PATH: {{ .Config.GetVariableValue "BUILDCONTEXTPATH" }}
NAMESPACE: {{ .Config.GetVariableValue "NAMESPACE" }}
ENABLENAMESPACECREATION: {{ .Config.GetVariableValue "ENABLENAMESPACECREATION" }}
AUTH_TYPE: {{ .Config.GetVariableValue "AZURELOGINAUTHTYPE" }}
{{`
jobs:
buildImage:
Expand All @@ -62,11 +63,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Builds and pushes an image up to your Azure Container Registry
- name: Build and push image to ACR
Expand All @@ -85,11 +87,12 @@ jobs:

# Logs in with your Azure credentials
- name: Azure login
uses: azure/login@v1.4.6
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
auth-type: ${{ env.AUTH_TYPE }}

# Use kubelogin to configure your kubeconfig for Azure auth
- name: Set up kubelogin for non-interactive login
Expand Down
11 changes: 11 additions & 0 deletions template/workflows/manifests/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,14 @@ variables:
value: "Microsoft.ContainerService/managedClusters"
description: "ARM resource type for cluster"
versions: ">=0.0.1"
- name: "AZURELOGINAUTHTYPE"
type: "string"
kind: "workflowAuthType"
default:
disablePrompt: true
value: "SERVICE_PRINCIPAL"
allowedValues:
- "SERVICE_PRINCIPAL"
- "IDENTITY"
description: "the authentication type to use for the azure/login github workflow"
versions: ">=0.0.1"
Loading