Coder Social home page Coder Social logo

mathieu-benoit / mathieu-benoit.github.io Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 3.0 4 MB

The content of my blog hosted at: https://mathieu-benoit.github.io/

Home Page: https://mathieu-benoit.github.io

Dockerfile 44.47% HTML 55.53%
hugo docker kubernetes gke gcp helm blog anthos-service-mesh container-security istio

mathieu-benoit.github.io's Introduction

mathieu-benoit.github.io's People

Contributors

dependabot[bot] avatar mathieu-benoit avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

mathieu-benoit.github.io's Issues

distroless?

ssl policy

Like described here https://github.com/GoogleCloudPlatform/gke-networking-recipes/tree/master/ingress/secure-ingress, I will do apply the default values:

If you do not choose one of the three pre-configured profiles or create a custom SSL policy, your load balancer uses the default SSL policy. The default SSL policy is equivalent to an SSL policy that uses the COMPATIBLE profile with a minimum TLS version of TLS 1.0.

gcloud compute ssl-policies create gke-ingress-ssl-policy \
    --profile COMPATIBLE  \
    --min-tls-version 1.0

And then attach it to my Ingress like described here https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#ssl

Hi I am following the link https://alwaysupalwayson.com/posts/2019/07/ci-cd-with-helm-chart/ to create the Helm Charts on AKS using ACR. But I am facing multiple issues.

Hi I am following the link https://alwaysupalwayson.com/posts/2019/07/ci-cd-with-helm-chart/ to create the Helm Charts on AKS using ACR. But I am facing multiple issues.

CI pipeline working fine by adding suggested changes. But not getting any value for helmChartVersion.

- bash: |
    chartPackage=$(ls $(projectName)-*.tgz)
    chartVersion=$(echo $(basename $chartPackage) | egrep -o '[0-9].*[0-9]')
    chartVersionAlreadyExists=$(az acr helm list \
                                    -n $(registryName) \
                                    -u $(registryLogin) \
                                    -p $(registryPassword) \
                                    --query "$(projectName)[?version=='$chartVersion'].version" \
                                    -o tsv)
    if [ "$chartVersion" != "$chartVersionAlreadyExists" ]; then
        az acr helm push \
            -n $(registryName) \
            -u $(registryLogin) \
            -p $(registryPassword) \
            $chartPackage
    fi
    echo $(jq -n --arg version "$chartVersion" '{helmChartVersion: $version}') > $(build.artifactStagingDirectory)/variables.json
  name: helmPush
  displayName: 'az acr helm push'

The problem is CD pipeline is not working at all.

Snippet:

I have tried multiple things:

- bash: |
   az login \
        --service-principal \
        -u=$(aksSpId) \
        -p='$(aksSpSecret)' \
        --tenant=$(aksSpTenantId)
    az aks get-credentials \
        -n $(aks) \
        -g $(rg)

    echo " the value of login is $(registryLogin) "
    echo "the value of password is $(registryPassword)"
    echo " the value of namespace is $(k8sNamespace) "
    echo "the value of project is $(projectName)"
   
    echo "the value of registry server name is $(registryServerName)"

    az acr login --name $(registryName) --username $(registryLogin) --password '$(registryPassword)'

    az acr helm repo add \
        --name $(registryName).azurecr.io/parrot \
        --username $(registryLogin) \
        --password '$(registryPassword)'

    helm repo update   

    helm search repo cnlabacrcohort17

    helmChartVersion=$(jq .helmChartVersion $(pipeline.workspace)/ci-pipeline/build-artifact/variables.json -r)

    echo "the value of helm chart version $helmChartVersion"

    helm registry login $(registryName).azurecr.io/parrot --username helmdemopush --password 'xxx'  

    helm repo update

    az acr helm list -n $(registryName) -u $(registryLogin) -p $(registryPassword) --query "$(projectName)[?version=='$chartVersion'].version" -o tsv

    #helm chart save $(pipeline.workspace)/ci-pipeline/build-artifact $(registryName).azurecr.io/cnlabacrcohort17:latest

    helm chart push $(registryName).azurecr.io/cnlabacrcohort17:1.0.0

    helm chart pull $(registryName).azurecr.io/cnlabacrcohort17/parrot:1.0.0

    helm chart export $(registryName).azurecr.io/cnlabacrcohort17/parrot:1.0.0 --destination $(build.stagingdirectory)

    helm install parrot \
      --namespace $(k8sNamespace) \
      --version 1.0.0 \
      --set image.repository=cnlabacrcohort17/parrot \
      --username helmdemopush \
      --password 'xxx' \
      --generate-name
      --debug \
      --wait 
  failOnStderr: true
  displayName: 'deploy helm chart'

But Getting below error:

2022-09-28T13:49:22.2828588Z Update Complete. ⎈ Happy Helming!⎈ 
2022-09-28T13:49:22.3197055Z NAME                   	CHART VERSION	APP VERSION	DESCRIPTION                                       
2022-09-28T13:49:22.3198512Z cnlabacrcohort17/parrot	182          	182        	Parrot is Captain Kube's sidekick, who shows ev...
2022-09-28T13:49:22.3546146Z the value of helm chart version 
2022-09-28T13:49:22.3862427Z WARNING! Using --password via the CLI is insecure. Use --password-stdin.
2022-09-28T13:49:23.3589479Z Login succeeded
2022-09-28T13:49:23.3950802Z Hang tight while we grab the latest from your chart repositories...
2022-09-28T13:49:24.0566941Z ...Successfully got an update from the "cnlabacrcohort17" chart repository
2022-09-28T13:49:24.0567965Z Update Complete. ⎈ Happy Helming!⎈ 
2022-09-28T13:49:24.3715024Z WARNING: This command is implicitly deprecated because command group 'acr helm' is deprecated and will be removed in a future release. Use 'helm v3' instead.
2022-09-28T13:49:25.9587089Z Error: Chart not found: cnlabacrcohort17.azurecr.io/cnlabacrcohort17:1.0.0
2022-09-28T13:49:25.9906672Z 1.0.0: Pulling from cnlabacrcohort17.azurecr.io/cnlabacrcohort17/parrot
2022-09-28T13:49:26.5240147Z Error: cnlabacrcohort17.azurecr.io/cnlabacrcohort17/parrot:1.0.0: not found
2022-09-28T13:49:26.5576891Z Error: Chart not found: cnlabacrcohort17.azurecr.io/cnlabacrcohort17/parrot:1.0.0
2022-09-28T13:49:26.5897116Z Error: failed to download "parrot" (hint: running `helm repo update` may help)

Not able to see any helm chart in ACR as well. Please help me out to resolve this issue. I am not getting why this is failing. Why Helm Install OR Helm Upgrade is not working in Azure CI-CD With AKS and ACR.

Thanks !!

Staging deployment

Setup a Staging deployment.

Dedicated Cloud Build definition based on the same YAML file if possible.

Kicked-off, as soon as a feature/* branch/PR is created.

Leverage same Ingress (with a staging service in the same namespace?) or deploy let's say a LoadBalancer in another namespace to get a new temporary public IP address without SSL termination?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.