This is a cloud-native application that focuses on the DevOps area.

Gitpod ready-to-code codecov FOSSA Status

Get started

  1. Install KubeSphere via kk (or other ways). This is an optional step, basically we need a Kubernetes Cluster and the front-end of DevOps.
  2. Install ks-devops via chart
  3. Replace the images of ks-apiserver and ks-controller-manager. In current phase, we need to use a temporary images of KubeSphere which comes from the branch remove-devops-ctrl:
  • kubespheredev/ks-apiserver:remove-devops-ctrl
  • kubespheredev/ks-controller-manager:remove-devops-ctrl

Want to go into deep? Please checkout the documentation.

Install it as a Helm Chart

First, please clone this git repository. Then run command: make install-chart

Run it locally

Technically, apiserver and controller are all binary files. So, it's possible to run them in your local environment. You just need to make sure that the connection between your environment and a Kubernetes cluster works well. This is a default config file of these components, please see also the sample file.

Development locally

  • Run kind in local or remote machine

  • Make sure that you can access cluster via kubectl command in local machine

  • Execute the following command to install our CRDs:

make install
  • Debug code...

  • Execute the following command to uninstall our CRDs:

make uninstall

Create Pipeline via CLI

ks is an official client of KubeSphere. You can create a Pipeline by it.

ks pip create --ws simple --template java --project default --skip-check -b good

APIs

For example, you can access an API like:

curl -H "Authorization: Bearer xxxx" \
  http://localhost:9090/kapis/devops.kubesphere.io/v1alpha3/devops/testblpsz/pipelines

Please get a token from Kubernetes cluster, and replace xxxx with it.

Code contribution

If you're going to update or add CRD go struct, please run the following command once done with that:

make manifests generate generate-listers

then, it can generate CRDs and DeepCopy methods.

Lint your codes

We are using golangci-lint as our code linter. Before you make some code changes, please execute following command to check code style:

golangci-lint run
# Or with specified folder, e.g.
golangci-lint run controllers/jenkinsconfig

TODO

  • A separate front-end project of ks-devops
  • Install ks-devops via helm chart in ks-installer
  • Auth support
    • OIDC support as a default provider

Experimental support

octant-ks-devops is a plugin of octant. It provides a dashboard for Kubernetes and ks-devops.

License

FOSSA Status

Available communication channels:

Comments
  • upgrade 3.2.1, run  pipeline  failure

    upgrade 3.2.1, run pipeline failure

    centos 7.9系统,一个master,多个worker节点,, 使用kk直接安装k8s和 kubesphere ;升级也是使用kk升级的。

    安装的时候kk版本是 v1.2.0; 升级的时候 kk版本是v1.2.1

    orgin version: k8s 1.20.4 kuebsphere 3.2.0

    upgrade versions: k8s 1.21.5 kubesphere 3.2.1


    build the orgin pipeline failure. and the pods of kubesphere-devops-worker is been ContainerCreating-->Terminating --->Destroy 。 升级过后,devops项目中运行流水线,一直卡在如下的界面,查看了下pods,发现 相关devops-worker的pods也是一直在创建和销毁中循环。

    image

    image

  • integrate external jenkins into kubesphere,    jenkins  Operate in full accordance with the tutorial, but you can't synchronize the pipeline to Jenkins

    integrate external jenkins into kubesphere, jenkins Operate in full accordance with the tutorial, but you can't synchronize the pipeline to Jenkins

    Tutorial link: https://jenkins-zh.cn/wechat/articles/2021/01/2021-01-11-exteranl-jenkins-in-kubesphere

    I operate according to the tutorial above. The current error is: after creating a new Devops project and pipeline in the project on kubesphere, click the pipeline to report an error like the picture below: FC9EFF8F-D094-4d9d-99A8-36D4B99263B3

    And, the pipeline created by kubesphere cannot be synchronized to the external Jenkins!

    Now I want to know the following questions:

    1. Does the kubesphere Jenkins auth plug-in of Jenkins need to configure the kubesphere account and password? If necessary, where to configure it? Now I click test connection and an error will occur:
    F7A2C867-9AE0-44dd-AF37-555E873E6927
    1. In kubesphere configuration, the configuration in configmap: kubesphere system / kubesphere config: how to fill in devops.password: fill in the plaintext or ciphertext of the login password?
    0ED89A02-11EB-417a-96E9-E93149C46BCC

    Kubesphere and Jenkins can't see the log of errors. Please provide me with ideas to solve the problem. Thank you very much!

  • Kubesphere in version 3.2 uses external Jenkins (version 2.320). Which configuration file of kubesphere needs to be modified?

    Kubesphere in version 3.2 uses external Jenkins (version 2.320). Which configuration file of kubesphere needs to be modified?

    Now I want to use kubesphere 3.2 connects external Jenkins. I follow the connection tutorial( https://cloud.tencent.com/developer/article/1779145 )Jenkins has been set up well.

    Now i need to configure the of kubesphere: do I need to modify kubesphere config or Devops config? Or do both configurations need to be modified? Now kubesphere config is configured as follows: is my configuration correct? Do i need to modify the devopsserviceaddress and endpoint, enable? Note: http://10.133.67.55:8080 This is the external Jenkins address

    devops: devopsServiceAddress: devops-apiserver. kubesphere-devops-system:9090 enable: false endpoint: http://devops-apiserver.kubesphere-devops-system:9090 host: http://10.133.67.55:8080/ maxConnections: 100 password: 1133c93065ca0e6948c4455edec15b7525 username: liuhuining

    thanks very much!

  • Add FluxCD Application Management

    Add FluxCD Application Management

    What type of PR is this?

    /kind feature /kind design

    What this PR does / why we need it:

    • Extend the gitops.kubesphere.io/v1alpha1/Application CRD to Support FluxApp.
    • Add fluxcd/application-controller to maintain the fluxcd Kustomization and HelmRelease.
    • Update the config/rbac/role.yaml
    • Add sample files in config/samples/gitops directory.

    Which issue(s) this PR fixes:

    Fixes #717 , #718

    Special notes for reviewers:

    Please check the following list before waiting reviewers:

    • [ ] Already committed the CRD files to the Helm Chart if you created some new CRDs
    • [ ] Already added the permission for the new API
    • [x] Already added the RBAC markers for the new controllers

    Does this PR introduce a user-facing change??

    None
    
  • The pipelined task cannot be run and terminated properly.

    The pipelined task cannot be run and terminated properly.

    image

    1. Terminating the mission is wrong. A parameter in url is undefined.
    2. I think it is due to the failure of the task to create successfully.
    3. After I switched the mirror back to 3.20, the task was running and terminated normally.

    Versions Used kubespheredev/devops-controller:master kubespheredev/devops-apiserver:master Kubernetes: 1.20

    How To Reproduce Steps to reproduce the behavior:

    1. Click the stop run button (All branches behave the same)
  • Fix that the controller did not use creator's token to trigger a Jenkins job

    Fix that the controller did not use creator's token to trigger a Jenkins job

    What dose this PR?

    1. Add devops.kubesphere.io/creator into annotations of PipelineRun
    2. Trigger PipelineRun with specific token which is issued by devops.kubesphere.io/creator

    Why do we need it?

    At present, if we trigger a Pipeline using non-admin account, we will get message Started by admin always.

    Steps to test

    Docker images for test:

    johnniang/devops-apiserver:dev-v3.2.1-rc.1-2debd81
    johnniang/devops-controller:dev-v3.2.1-rc.1-2debd81
    
    1. Create a Workspace, DevOps Project, Pipeline using admin account
    2. Create another account tester and invite him/her into that Workspace and DevOps Project
    3. Trigger that Pipeline using tester account
    4. See the Last Message column

    image

    /kind bug /milestone v3.2 /cc @kubesphere/sig-devops

  • fix: when branch name is invalid, report a error message

    fix: when branch name is invalid, report a error message

    What type of PR is this?

    /kind bug /kind hacktoberfest /kind hacktoberfest-accepted

    What this PR does / why we need it:

    Before save resource, we should check branch name whether is valid, and build the label selector to query target PipelineRuns, we should check the branch name of request also.

    Which issue(s) this PR fixes:

    Fixes #104

  • Failed to create pipeline and credential in a multi-cluster environment

    Failed to create pipeline and credential in a multi-cluster environment

    Environment

    host 3.1 + member 3.1 http://139.198.9.112:30883

    How To Reproduce Steps to reproduce the behavior:

    1. Go to workspace 'ws3'
    2. Go to devops project 'dev3-1'
    3. Create credential and pipeline

    Expected behavior Pipeline and credential created successfully

    Actual behavior Failed to create pipeline and credential image image image

    /priority high /area devops /cc @kubesphere/sig-devops /kind bug /milestone 3.1.0

  • Change default docker registry into docker.io for charts

    Change default docker registry into docker.io for charts

    Currently, the default docker registry of ks-devops charts is ghcr.io, which is too slow if you are in Chinese network.

    See also: https://github.com/kubesphere-sigs/ks-devops/blob/678147e3ae80f3f12370ee743c03d2041f212864/charts/ks-devops/values.yaml

    Suggestions

    Change the default docker registry from ghcr.io into docker.io.

    /good-first-issue

  • Fix the problem caused by strange branch names that contain special characters

    Fix the problem caused by strange branch names that contain special characters

    What this PR dose

    • Replace label of SCM ref name with field indexer.
    • Remove branch name validation

    Why we need it

    Please see:

    • #104
    • #397

    Which issue this PR fixes

    Fix #397

    How to test it

    Docker images for test:

    johnniang/devops-apiserver:dev-v3.2.1-rc.1-fe5d958
    johnniang/devops-controller:dev-v3.2.1-rc.1-fe5d958
    
    1. Create Multi-branch Pipeline, using repo https://gitlab.com/johnniang/jenkinsfile-multi-demo.
    2. Click Branches tab and see all branches. image
    3. Click into branch naming 中文测试分支 image

    Please note that KubeSphere console didn't escape the branch name, so we cannot click branch naming feat/featureA util console fixes it: image

    /kind bug /cc @kubesphere/sig-devops /cc @mangoGoForward

  • Refactor: use JSON-based payload to create Jenkins pipeline

    Refactor: use JSON-based payload to create Jenkins pipeline

    What I did in this PR:

    1. Add jenkins-cli to the client.
    2. Add createJobInFolder in jenkins-cli.
    3. Create jenkinsClient to the client.
    4. replace create project pipeline with the new function.
  • Suggest to add more information for continuous deployment parameters

    Suggest to add more information for continuous deployment parameters

    What is version of KubeSphere DevOps has the issue?

    v3.3.1

    How did you install the Kubernetes? Or what is the Kubernetes distribution?

    kubekey

    What happened?

    截屏2022-12-15 16 06 38

    Users can not understand the parameters when create continuous deployment, they should open the doc together: https://kubesphere.io/zh/docs/v3.3/devops-user-guide/how-to-use/continuous-deployments/use-gitops-for-continous-deployment/#%E5%88%9B%E5%BB%BA%E6%8C%81%E7%BB%AD%E9%83%A8%E7%BD%B2

    Suggest to add some info around the parameters, then users can use the create page only

    Relevant log output

    No response

    Additional information

    No response

  • Modify the Chinese version of argocd application status

    Modify the Chinese version of argocd application status

    What is version of KubeSphere DevOps has the issue?

    v3.3.1

    How did you install the Kubernetes? Or what is the Kubernetes distribution?

    kubekey

    What happened?

    截屏2022-10-25 19 44 06

    degrade, 建议改成 被降级, 这里表示 某些资源未达到 健康状态。(healthy 是 100% 所有资源都是健康的, 所以其实 degrade 也算 部分健康 ) missing, 建议改成 缺失, 这里就是表明 没找到资源, 丢失感觉有点主观概念。 suspended,建议改成 已暂停,比如一个 cronjob,暂停,会处于这种状态,翻译成已下架 不太合适。

    Relevant log output

    No response

    Additional information

    No response

  • Optimize user experience for multi branch pipeline

    Optimize user experience for multi branch pipeline

    What is version of KubeSphere DevOps has the issue?

    v3.3.1

    How did you install the Kubernetes? Or what is the Kubernetes distribution?

    kubekey

    Describe this feature

    截屏2022-12-07 15 42 09

    User need scan the repo first, then show the branch, and is able to run.

    Now there is a run on console just after create the multi branch pipeline, user will click the run, and it will show an error.

    Additional information

    No response

  • Pipelinerun status display in console change to not running after cancel it

    Pipelinerun status display in console change to not running after cancel it

    What is version of KubeSphere DevOps has the issue?

    v3.3.1

    How did you install the Kubernetes? Or what is the Kubernetes distribution?

    kubekey

    What happened?

    Jenkinsfile:

    pipeline {
      agent {
        node {
          label 'java'
        }
    
      }
      stages {
        stage('stage-pk518') {
          agent none
          steps {
            input(message: 'release image with tag?', submitter: 'stark2')
            checkout([$class: 'GitSCM', 
            doGenerateSubmoduleConfigurations: false,
            submoduleCfg: [],
            extensions: [[$class: 'CloneOption', depth: 1, noTags: false, reference: '', shallow: true]],
            userRemoteConfigs: [[
              url: 'https://github.com/chilianyi/jenkins-test.git'
              ]]
    ])
          }
        }
    
      }
    }
    
    截屏2022-12-07 15 18 05

    Max build record set to 2.

    Run some pipelineruns, the pipelinerun need to review, When cancel the pipelinerun, the build will be deleted by jenkins, then it will change to not running status

    截屏2022-12-07 15 19 32 截屏2022-12-07 15 19 40

    Relevant log output

    No response

    Additional information

    No response

  • Keep the same status with console & add run id  for pipelinerun custom resource

    Keep the same status with console & add run id for pipelinerun custom resource

    What is version of KubeSphere DevOps has the issue?

    v3.3.1

    How did you install the Kubernetes? Or what is the Kubernetes distribution?

    kubekey

    Describe this feature

    # kubectl get pipelinerun -n starkxhqxb | grep stark-
    stark-4z2zh    Pending     48m
    stark-59zll    Pending     48m
    stark-846zm    Running     127m
    stark-8scb7    Running     127m
    stark-l4kkf    Running     127m
    stark-n7ckp    Failed      48m
    stark-ngddd    Pending     36m
    stark-p7kxm    Running     127m
    stark-q9j9p    Running     128m
    
    截屏2022-12-07 15 02 50

    It is hard to match pipelinerun cr with run records in console.

    Backend feature:

    1. Add run id in pipeline cr.
    2. Keep the same status between pipeline cr with run records in console.

    Frontend feature:

    1. Able to show run id for not running pipelinerun, if it has run id in pipelinerun cr
    # kubectl get pipelinerun stark-q9j9p -n starkxhqxb -o yaml
    apiVersion: devops.kubesphere.io/v1alpha3
    kind: PipelineRun
    metadata:
      annotations:
        devops.kubesphere.io/creator: admin
        devops.kubesphere.io/jenkins-pipelinerun-id: "14"
        devops.kubesphere.io/jenkins-pipelinerun-stages-status: "null"
        devops.kubesphere.io/jenkins-pipelinerun-status: "null"
      creationTimestamp: "2022-12-07T04:54:03Z"
    

    Additional information

    No response

  • continuous deployment support rollback

    continuous deployment support rollback

    What is version of KubeSphere DevOps has the issue?

    v3.3.1

    How did you install the Kubernetes? Or what is the Kubernetes distribution?

    No response

    Describe this feature

    we only use cd in devops, is there any plan to that continuous deployment support rollback?

    Additional information

    No response

An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers

Developer-oriented Continuous Delivery Product ⁣ English | 简体中文 Table of Contents Zadig Table of Contents What is Zadig Quick start How to use? How to

Oct 19, 2021
provide api for cloud service like aliyun, aws, google cloud, tencent cloud, huawei cloud and so on

cloud-fitter 云适配 Communicate with public and private clouds conveniently by a set of apis. 用一套接口,便捷地访问各类公有云和私有云 对接计划 内部筹备中,后续开放,有需求欢迎联系。 开发者社区 开发者社区文档

Dec 20, 2022
Defalyzer: A cross-platform software that focuses on defacement analyzing and mirror tracking
Defalyzer: A cross-platform software that focuses on defacement analyzing and mirror tracking

Project Defalyzer is a cross-platform software that focuses on defacement analyz

Jul 26, 2022
A Kubernetes Operator, that helps DevOps team accelerate their journey into the cloud and K8s.
A Kubernetes Operator, that helps DevOps team accelerate their journey into the cloud and K8s.

A Kubernetes Operator, that helps DevOps team accelerate their journey into the cloud and K8s. OAM operator scaffolds all of the code required to create resources across various cloud provides, which includes both K8s and Non-K8s resources

Nov 30, 2021
The Cloud Native Application Proxy
The Cloud Native Application Proxy

Traefik (pronounced traffic) is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy. Traefik integrates with your ex

Jan 9, 2023
The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Sep 27, 2022
cloud native application deploy flow
cloud native application deploy flow

Triton-io/Triton English | 简体中文 Introduction Triton provides a cloud-native DeployFlow, which is safe, controllable, and policy-rich. For more introdu

May 28, 2022
A cloud-native application simulator for golang

Build and upload Docker images Build docker images for main application and work

Aug 10, 2022
Cloud-Z gathers information and perform benchmarks on cloud instances in multiple cloud providers.

Cloud-Z Cloud-Z gathers information and perform benchmarks on cloud instances in multiple cloud providers. Cloud type, instance id, and type CPU infor

Jun 8, 2022
Supporting your devops by shortening your strings using common abbreviations and clever guesswork

abbreviate Shorten your strings using common abbreviations. Supported by Tidelift Motivation This tool comes out of a frustration of the name of resou

Dec 14, 2022
k6 is a modern load testing tool for developers and testers in the DevOps era.
k6 is a modern load testing tool for developers and testers in the DevOps era.

k6 is a modern load testing tool, building on our years of experience in the load and performance testing industry. It provides a clean, approachable scripting API, local and cloud execution, and flexible configuration.

Jan 8, 2023
Power-ups for the daily DevOps life

DevOps Loop Power-Ups Requirements Connected Kubernetes cluster. Some features need support for LoadBalancer services Permission to list, create and d

Nov 3, 2022
sail is an operation framework based on Ansible/Helm. sail follows the principles of Infrastructure as Code (IaC), Operation as Code (OaC), and Everything as Code. So it is a tool for DevOps.

sail 中文文档 sail is an operation framework based on Ansible/Helm. sail follows the principles of Infrastructure as Code (IaC), Operation as Code (OaC),a

Dec 16, 2021
Zeus - A Devops Automation Tool

With this tool we are trying generalize and minimize devops reperating task while trying to encourage shared responsibility model acorss devloper teams.

May 31, 2022
The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases

The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases. It eliminates the dependency on a human operator or administrator for the majority of database operations.

Dec 14, 2022
DevOps With Kubernetes exercise

todo-project [https://github.com/pasiol/todo-project/tree/1.05] Exercise 1.06 [email protected]:~$ k3d cluster delete INFO[0000] Deleting cluster 'k3s-defaul

Dec 8, 2021
Kubernetes operator for the Azure DevOps pipe-line agents

adoagent-operator Kubernetes operator for the Azure DevOps pipe-line agents init.sh #!/bin/bash # docker and github repo username export USERNAME='ba

Nov 11, 2021
Kubernetes operator for the Azure DevOps self-hosted pipe-line agent.

Kubernetes operator for the Azure DevOps self-hosted pipe-line agent. The operator adds an extra layer of configuration on top of the default images like: proxy settings, pool settings and auth keys.

Sep 1, 2022
Repositório base p/ tema12 da trilha de DevOps.

tema12--Jenkins Informações Repositório base: https://github.com/brazdore/ilegra-devops-tema12.git Requisitos Jenkins Docker Packer JDK 11 ou maior Pr

Dec 21, 2021