Code Monkey home page Code Monkey logo

k8s-actions's Issues

Where should I put manifests?

Hello,

where is the directory I should put this manifests?

I'm receiving this error:

#[error]Error: ENOENT: no such file or directory, open 'manifests/deployment.yml'

Update error message or set defaults for endpoint URLs in aks-set-context

In the aks-set-context command it's not clear that activeDirectoryEndpointUrl and resourceManagerEndpointUrl are required values in the Azure credentials, and the error message doesn't mention them.

I spent some time debugging this using an existing service principal which didn't have the same output as the one in the docs, and it might be more straightforward to either add those values to the error message or set defaults of "https://login.microsoftonline.com" and "https://management.azure.com/" if those will almost always be the values.

I'm happy to put in a PR for this if it would be helpful, and thanks for maintaining this repo! It was really helpful in getting started deploying to AKS with actions

Issue with Old Version of Tool Cache

Hello!

I was having some issues getting setup-kubectl working properly.

I kept getting:

##[warning]GetStableVersionFailed
##[error]Error: DownloadKubectlFailed

when trying to use this basic incantation for it: https://github.com/djquan/k8s-action-repro/blob/master/.github/workflows/main.yml#L18-L20

I tracked down the issue to the use of an out-of-date tool-cache that was using the wrong environment variables. Specifically, the version of tool-cache that this repository is using is looking for RUNNER_TEMPDIRECTORY and RUNNER_TOOLSDIRECTORY, when the variables in the actual runner are RUNNER_TEMP and RUNNER_TOOL_CACHE. This was updated in tool-cache recently, actions/toolkit@5218a83#diff-ecd700b4a481c69908b4b61fc89806ad.

This reproduction case should show the correct variables the runner has, the method I eventually used to get setup-ctl working, and the error it fails with if the old environment variables are not set. The results from the checks are here.

Apologies if I missed anywhere this behavior was documented. I did try to update the packages on a fork, but didn't get too far before running into some issues that I couldn't get past.

Reproduction case:

name: Build
on:
  push:
    branches:
      - "master"
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: display env
      run: env | grep RUNNER
    - name: azure with env var
      uses: azure/k8s-actions/setup-kubectl@master
      continue-on-error: true
      env:
        RUNNER_TEMPDIRECTORY: ${RUNNER_TEMP}
        RUNNER_TOOLSDIRECTORY: ${RUNNER_TOOL_CACHE}
    - name: azure without env var
      uses: azure/k8s-actions/setup-kubectl@master
      continue-on-error: true

Namespace gets ignored

I have the following problem:
When i add a secret to an existing namespace in the cluster: /usr/bin/kubectl create secret generic mysql-secret --from-literal=MYSQL_DATABASE=*** --from-literal=MYSQL_USERNAME=*** -- from-literal=MYSQL_PASSWORD=*** -n magento-test-develop

It adds the secret to the default namespace but the custom namespace is there. And the expected behaviour should be that it adds the secret to the namespace given.

images command doesn't work in k8s-deploy when using an image from a private repository with a specified port

When trying to update the image reference in my deployment script, there's an issue.

In my action file I have

        - uses: azure/k8s-actions/k8s-deploy@master
        with:
          manifests: |
            deployment.yml
          images: |
            my.repo.com:1234/helloworld:${{ github.sha }}

When I check the "k8s-deploy/src/kubernetes-utils.ts", I can see the to find which image should be replace there's a

let imageName = container.split(':')[0];

Which can't work in this case. I think it should be:

let imageName = container;
if (imageName.indexOf(':') > 0) {
	imageName = imageName.substring(0, imageName.lastIndexOf(':'));
}

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.