Giter Site home page Giter Site logo

azure / k8s-actions Goto Github PK

View Code? Open in Web Editor NEW
110.0 25.0 48.0 830 KB

Enable GitHub developers to deploy to Kubernetes service using GitHub Actions

License: MIT License

JavaScript 55.06% TypeScript 44.94%
aks docker kubernetes-cluster k8s actions

k8s-actions's Introduction

IMPORTANT NOTICE:

Actions hosted in this repo are now moved to new GitHub repositories. Please update your existing workflows with the new actions as these old actions will be ARCHIVED and will not receive any updates. Refer to https://github.com/Azure/actions for updated action repo details.
For example, the action azure/k8s-actions/k8s-deploy@master should be replaced with Azure/k8s-deploy@v1 in your workflows.

Old Action New Action
Kubernetes deploy azure/k8s-actions/k8s-deploy@master Azure/k8s-deploy@v1
AKS set context azure/k8s-actions/aks-set-context@master azure/aks-set-context@v1
Kubernetes set context azure/k8s-actions/k8s-set-context@master azure/k8s-set-context@v1
Kubernetes create secret azure/k8s-actions/k8s-create-secret@master azure/k8s-create-secret@v1
Kubectl tool installer azure/k8s-actions/setup-kubectl@master azure/setup-kubectl@v1

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

k8s-actions's People

Contributors

azooinmyluggage avatar italypaleale avatar microsoftopensource avatar msftgits avatar n-usha avatar pdebruin avatar roopeshnair avatar thesattiraju avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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'

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(':'));
}

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

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.