-
Notifications
You must be signed in to change notification settings - Fork 19
Adding aks template #44
base: master
Are you sure you want to change the base?
Conversation
| azureSubscriptionEndpointForSecrets: $(azureSubscription) | ||
| azureContainerRegistry: $(containerRegistry) | ||
| secretName: $(dockerAuthSecretName) | ||
| versionSpec: 1.10.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this remain hard coded ?
| dockerFile: $(dockerFile) | ||
| imageName: $(imageName) | ||
| useDefaultContext: false | ||
| buildContext: Application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can build context always be Application ?
| protocol: TCP | ||
| name: http | ||
| selector: | ||
| app: $(appName)' | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also need to consider ingress.yaml for when httpRoutingIsEnabled.
you can asume that parameter AksResource will be of type GenericResource, and hence will have all these information in its properties.
you can extract it this way:
httpRoutingEnabled = {{ inputs.aKSResource.properties.addonProfiles.httpapplicationrouting.enabled }}
| - uses: azure/docker-login@v1 | ||
| with: | ||
| login-server: $REGISTRY_URL | ||
| username: ${{ assets.REGISTRY_USERNAME }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${{ assets.containerRegistryUsername }}
| with: | ||
| login-server: $REGISTRY_URL | ||
| username: ${{ assets.REGISTRY_USERNAME }} | ||
| password: ${{ assets.REGISTRY_PASSWORD }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${{ assets.containerRegistryPassword}}
| build-and-deploy: | ||
| env: | ||
| REGISTRY_URL: {{#toLower}} {{{inputs.containerRegistry}}} {{/toLower}}.azurecr.io | ||
| SERVICE_NAME: {{#sanitizeString}} {{{ inputs.AKSresource.name 50}}} {{/sanitizeString}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inputs.aksCluster
use this where we need to access the cluster resource
| namespacePresent=`kubectl get namespace | grep $NAMESPACE | wc -l` | ||
| if [ $namespacePresent -eq 0 ] | ||
| then | ||
| echo `kubectl create namespace $NAMESPACE` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we assume that the namespace is created after running this command or do we need to wait/check again for confirmation ?
|
|
||
| - uses: azure/k8s-set-context@v1 | ||
| with: | ||
| kubeconfig: ${{ secrets.KUBE_CONFIG }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we also need to add logout in the end of workflow ?
| azureSubscription: '{{{ assets.serviceConnectionId }}}' | ||
|
|
||
| # Kubernetes Service name | ||
| serviceName: '{{ #sanitizeString }} {{{ inputs.AKSresource.name }}} {{ /sanitizeString }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use inputs.aksCluster
|
|
||
| - uses: azure/k8s-set-context@v1 | ||
| with: | ||
| kubeconfig: ${{ secrets.KUBE_CONFIG }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assets.aksKubeConfig
No description provided.