Kubernetes operator for the Azure DevOps self-hosted pipe-line agent.

azdevops-agent-operator

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.

init.sh

#!/bin/bash

# docker and github repo username
export USERNAME='bartvanbenthem'
# image and bundle version
export VERSION=0.5.0
# operator repo and name
export OPERATOR_NAME='azdevops-agent-operator'
export OPERATOR_GROUP='azdevops'
export OPERATOR_KIND='Agent'
export OPERATOR_DOMAIN='gofound.nl'

cd $OPERATOR_NAME
# scaffold operator
operator-sdk init --domain $OPERATOR_DOMAIN --repo github.com/$USERNAME/$OPERATOR_NAME --skip-go-version-check
operator-sdk create api --group $OPERATOR_GROUP --version v1alpha1 --kind $OPERATOR_KIND --resource --controller

# always run make after changing *_types.go and *_controller.go
go get all
go mod tidy

make generate
make manifests

#######################################################
# Build the operator
make manifests
make docker-build docker-push IMG=docker.io/$USERNAME/$OPERATOR_NAME:v$VERSION

#######################################################
# test and deploy the operator
make deploy IMG=docker.io/$USERNAME/$OPERATOR_NAME:v$VERSION
kubectl create ns test
kubectl -n test apply -f config/samples/azdevops_v1alpha1_agent.yaml
kubectl -n test get agent agent-sample -o yaml
kubectl -n test get pods
# cleanup test deployment
make undeploy
kubectl delete ns test

#######################################################
#######################################################
# Operator Lifecycle Manager - create and install bundle
operator-sdk olm install
operator-sdk olm status

# set env vars for creating the bundle
export IMG=docker.io/$USERNAME/$OPERATOR_NAME:v$VERSION
export BUNDLE_IMG=docker.io/$USERNAME/$OPERATOR_NAME-bundle:v$VERSION

# make the olm bundle
make bundle
# build and push the bundle image:
make bundle-build bundle-push
# verify bundle
operator-sdk bundle validate docker.io/$USERNAME/$OPERATOR_NAME-bundle:v$VERSION

# installing the bundle
operator-sdk run bundle docker.io/$USERNAME/$OPERATOR_NAME-bundle:v$VERSION --timeout 15m

# apply custom resource example
kubectl create ns test
kubectl -n test apply -f config/samples/azdevops_v1alpha1_agent.yaml
kubectl -n test get agent agent-sample

#######################################################
#######################################################
# Cleaning up your cluster
k -n test get operators
operator-sdk cleanup adoagent-operator
# If your bundle is in a bad state, you can clean up all the OLM and OLM-dependent 
# resources by running the following command:
operator-sdk olm uninstall


#######################################################
# Redeploying from scratch
operator-sdk olm install

operator-sdk run bundle docker.io/$USERNAME/$OPERATOR_NAME-bundle:v1.0.0
kubectl apply -f config/sample/ado_v1alpha1_agent.yaml

Agent Sample

apiVersion: azdevops.gofound.nl/v1alpha1
kind: Agent
metadata:
  name: agent-sample
spec:
  size: 2
  image: # image: mcr.microsoft.com/azure-pipelines/vsts-agent:ubuntu-16.04
  pool:
    url: example-url
    token: example-token
    poolName: mypool
    agentName: myagent
    workDir:
  key: {}
  proxy:
    httpProxy: http://proxy.gofound.nl
    httpsProxy: https://proxy.gofound.nl
    ftpProxy: 
    noProxy:
  mtuValue:
  configMap:
Similar Resources

K8s-network-config-operator - Kubernetes network config operator to push network config to switches

Kubernetes Network operator Will add more to the readme later :D Operations The

May 16, 2022

Pulumi-k8s-operator-example - OpenGitOps Compliant Pulumi Kubernetes Operator Example

Pulumi GitOps Example OpenGitOps Compliant Pulumi Kubernetes Operator Example Pr

May 6, 2022

Kubernetes Operator Samples using Go, the Operator SDK and OLM

Kubernetes Operator Samples using Go, the Operator SDK and OLM

Kubernetes Operator Patterns and Best Practises This project contains Kubernetes operator samples that demonstrate best practices how to develop opera

Nov 24, 2022

Shoes-agent - Framework for myshoes provider using agent

Shoes-agent - Framework for myshoes provider using agent

shoes-agent Framework for myshoes provider using agent. agent: agent for shoes-a

Jan 8, 2022

Coriolis-snapshot-agent - Coriolis snapshot agent leverages the blk-snap kernel module to create copy-on-write snapshots of block devices

Coriolis snapshot agent Coriolis snapshot agent leverages the blk-snap kernel mo

Feb 17, 2022

Integrated ssh-agent for windows. (pageant compatible. openSSH ssh-agent etc ..)

Integrated ssh-agent for windows. (pageant compatible. openSSH ssh-agent etc ..)

OmniSSHAgent About The chaotic windows ssh-agent has been integrated into one program. Chaos Map of SSH-Agent on Windows There are several different c

Dec 19, 2022

DevOps With Kubernetes exercise

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

Dec 8, 2021

Git-based DevOps PaaS: Project, Pipeline, Kubernetes, ServiceMesh, MutilCloud

gitctl 一体化 DevOps 平台 从代码到应用的一体化编排,应用全生命周期管理,多云托管。 gitctl 会有哪些功能? git 代码托管 projec

Oct 24, 2022

Test Operator using operator-sdk 1.15

test-operator Test Operator using operator-sdk 1.15 operator-sdk init --domain rbt.com --repo github.com/ravitri/test-operator Writing kustomize manif

Dec 28, 2021
Basic Kubernetes operator that have multiple versions in CRD. This operator can be used to experiment and understand Operator/CRD behaviors.

add-operator Basic Kubernetes operator that have multiple versions in CRD. This operator can be used to experiment and understand Operator/CRD behavio

Dec 15, 2021
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 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
An operator which complements grafana-operator for custom features which are not feasible to be merged into core operator

Grafana Complementary Operator A grafana which complements grafana-operator for custom features which are not feasible to be merged into core operator

Aug 16, 2022
Igo Agent is the agent of Igo, a command-line tool, through which you can quickly start Igo

igo agent 英文 | 中文 Igo Agent is the agent of Igo, a command-line tool, through which you can quickly start Igo, and other capabilities may be added lat

Dec 22, 2021
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)

Terraform Provider for Azure (Resource Manager) Version 2.x of the AzureRM Provider requires Terraform 0.12.x and later, but 1.0 is recommended. Terra

Oct 16, 2021
azqlite is a lightweight wrapper around Azure's SDK to interact with the Azure Storage Queue service in a simpler and more idiomatic way.

azqlite azqlite is a lightweight wrapper around github.com/Azure/azure-storage-queue-go to interact with the Azure Storage Queue service in a simpler

Mar 12, 2022
The Elastalert Operator is an implementation of a Kubernetes Operator, to easily integrate elastalert with gitops.

Elastalert Operator for Kubernetes The Elastalert Operator is an implementation of a Kubernetes Operator. Getting started Firstly, learn How to use el

Jun 28, 2022
Minecraft-operator - A Kubernetes operator for Minecraft Java Edition servers

Minecraft Operator A Kubernetes operator for dedicated servers of the video game

Dec 15, 2022