Conversation
| azureSubscriptionEndpointForSecrets: $(azureSubscription) | ||
| azureContainerRegistry: $(containerRegistry) | ||
| secretName: $(dockerAuthSecretName) | ||
| versionSpec: 1.10.12 |
| dockerFile: $(dockerFile) | ||
| imageName: $(imageName) | ||
| useDefaultContext: false | ||
| buildContext: Application |
There was a problem hiding this comment.
can build context always be Application ?
| protocol: TCP | ||
| name: http | ||
| selector: | ||
| app: $(appName)' | |
There was a problem hiding this comment.
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.
${{ assets.containerRegistryUsername }}
| with: | ||
| login-server: $REGISTRY_URL | ||
| username: ${{ assets.REGISTRY_USERNAME }} | ||
| password: ${{ assets.REGISTRY_PASSWORD }} |
There was a problem hiding this comment.
${{ 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.
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.
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.
do we also need to add logout in the end of workflow ?
| azureSubscription: '{{{ assets.serviceConnectionId }}}' | ||
|
|
||
| # Kubernetes Service name | ||
| serviceName: '{{ #sanitizeString }} {{{ inputs.AKSresource.name }}} {{ /sanitizeString }}' |
|
|
||
| - uses: azure/k8s-set-context@v1 | ||
| with: | ||
| kubeconfig: ${{ secrets.KUBE_CONFIG }} |
No description provided.