Skip to content

Commit

Permalink
Create single woodpecker chart (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
anbraten authored Mar 30, 2023
1 parent f3f9f9b commit 49f4483
Show file tree
Hide file tree
Showing 24 changed files with 330 additions and 42 deletions.
File renamed without changes.
20 changes: 12 additions & 8 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
variables:
- &helm_image alpine/helm:latest

when:
- event: tag
- event: push
branch: main
- event: pull_request

pipeline:
set-version:
image: *helm_image
Expand All @@ -9,16 +15,15 @@ pipeline:
- export CHART_VERSION="${CI_COMMIT_TAG##v}"
- export CHART_VERSION=$${CHART_VERSION:=0.0.0}
- echo "Version $CHART_VERSION"
- sed -i "s/<version>/$CHART_VERSION/g" woodpecker-agent/Chart.yaml
- sed -i "s/<version>/$CHART_VERSION/g" woodpecker-server/Chart.yaml
- cat woodpecker-agent/Chart.yaml
- cat woodpecker-server/Chart.yaml
- sed -i "s/<version>/$CHART_VERSION/g" charts/agent/Chart.yaml
- sed -i "s/<version>/$CHART_VERSION/g" charts/server/Chart.yaml
- cat charts/agent/Chart.yaml
- cat charts/server/Chart.yaml

lint:
image: *helm_image
commands:
- helm lint woodpecker-agent/
- helm lint woodpecker-server/
- helm lint

release:
image: quay.io/helmpack/chart-releaser:v1.5.0
Expand All @@ -29,8 +34,7 @@ pipeline:
- git config --global user.email "[email protected]"
- git config --global user.name "woodpecker-bot"
- mkdir -p .cr-index
- cr package woodpecker-server
- cr package woodpecker-agent
- cr package .
- cr upload --owner woodpecker-ci --git-repo woodpecker-ci.github.io --release-name-template "helm-{{ .Name }}-{{ .Version }}"
- git clone https://github.com/woodpecker-ci/woodpecker-ci.github.io.git
- cd woodpecker-ci.github.io/ && cr index --owner woodpecker-ci --git-repo woodpecker-ci.github.io --pages-branch master --package-path ../.cr-release-packages --index-path ../.cr-index/index.yaml --charts-repo https://woodpecker-ci.org --push --release-name-template "helm-{{ .Name }}-{{ .Version }}"
Expand Down
37 changes: 37 additions & 0 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: v2
name: woodpecker
description: A Helm chart for Woodpecker CI

type: application

maintainers:
- name: Woodpecker Maintainers
email: [email protected]

keywords:
- continuous-delivery
- continuous-deployment
- continuous-integration
- docker
- go

sources:
- https://github.com/woodpecker-ci/woodpecker
- https://github.com/woodpecker-ci/helm

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.15.7"

dependencies:
- name: server
condition: server.enabled
- name: agent
condition: agent.enabled
File renamed without changes.
17 changes: 17 additions & 0 deletions charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2
name: agent
description: A Helm chart for the Woodpecker agent
type: application
version: 0.1.0
appVersion: "v0.15.7"
keywords:
- continuous-delivery
- continuous-deployment
- continuous-integration
- docker
- go
sources:
- https://github.com/woodpecker-ci/woodpecker
maintainers:
- name: Woodpecker Maintainers
email: [email protected]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions charts/server/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
17 changes: 17 additions & 0 deletions charts/server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2
name: server
description: A Helm chart for the Woodpecker server
type: application
version: 0.1.0
appVersion: "v0.15.7"
keywords:
- continuous-delivery
- continuous-deployment
- continuous-integration
- docker
- go
sources:
- https://github.com/woodpecker-ci/woodpecker
maintainers:
- name: Woodpecker Maintainers
email: [email protected]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
224 changes: 224 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# Default values for woodpecker.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

agent:
enabled: true

replicaCount: 2

image:
registry: docker.io
repository: woodpeckerci/woodpecker-agent
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: ""

env:
WOODPECKER_SERVER: "woodpecker-server.<namespace>.svc.cluster.local:9000"
WOODPECKER_BACKEND: kubernetes
WOODPECKER_BACKEND_K8S_NAMESPACE: woodpecker
WOODPECKER_BACKEND_K8S_STORAGE_CLASS: ""
WOODPECKER_BACKEND_K8S_VOLUME_SIZE: 10G
WOODPECKER_BACKEND_K8S_STORAGE_RWX: true
WOODPECKER_BACKEND_K8S_POD_LABELS: ""
WOODPECKER_BACKEND_K8S_POD_ANNOTATIONS: ""

# Docker-in-Docker is normally not needed as Woodpecker natively supports Kubernetes
dind:
enabled: false
image: "docker:20.10.12-dind"
env:
DOCKER_DRIVER: "overlay2"
resources: {}

extraSecretNamesForEnvFrom:
- woodpecker-secret

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created (also see RBAC subsection)
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
rbac:
# If your cluster has RBAC enabled and you're using the Kubernetes agent-
# backend you'll need this. (this is true for almost all production clusters)
# only change this if you have a non CNCF compliant cluster, missing the RBAC endpoints
# the Role and RoleBinding are only created if serviceAccount.create is also true
create: true
# additional annotations and labels in role and roleBinding are only needed, if you
# are using additional tooling to manage / verify roles or roleBindings (OPA, etc.)
role:
annotations: {}
labels: {}
roleBinding:
annotations: {}
labels: {}

podAnnotations: {}

podSecurityContext:
{}
# fsGroup: 2000

securityContext:
{}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

dnsConfig: {}

## Using topology spread constraints, you can ensure that there is at least one agent
## pod for each topology zone, e.g. one per arch for multi-architecture clusters
## or one for each region for geographically distributed cloud-hosted clusters.
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
topologySpreadConstraints: []
# - maxSkew: 1
# topologyKey: "beta.kubernetes.io/arch"
# whenUnsatisfiable: "DoNotSchedule"
# labelSelector:
# matchLabels:
# "app.kubernetes.io/name": woodpecker-agent

server:
enabled: true

statefulSet:
annotations: {}
labels: {}
replicaCount: 1
# The maximum number of revisions that will be maintained in the StatefulSet's revision history
# Default in 10.
revisionHistoryLimit: 5

updateStrategy:
type: RollingUpdate

image:
registry: docker.io
repository: woodpeckerci/woodpecker-server
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: ""

env:
WOODPECKER_ADMIN: "woodpecker,admin"
WOODPECKER_HOST: "https://xxxxxxx"
# WOODPECKER_GITHUB: "true"

extraSecretNamesForEnvFrom:
# - woodpecker-github-client
# - woodpecker-github-secret
- woodpecker-secret

persistentVolume:
enabled: true
size: 10Gi
mountPath: "/var/lib/woodpecker"
storageClass: ""

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

podAnnotations:
{}
# prometheus.io/scrape: "true"

podSecurityContext:
{}
# fsGroup: 2000

securityContext:
{}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP
port: &servicePort 80

ingress:
enabled: false
annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"

# -- Defines which ingress controller will implement the resource
ingressClassName: ""

hosts:
- host: chart-example.local
paths:
- path: /
backend:
serviceName: chart-example.local
servicePort: *servicePort
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

dnsConfig: {}
17 changes: 0 additions & 17 deletions woodpecker-agent/Chart.yaml

This file was deleted.

Loading

0 comments on commit 49f4483

Please sign in to comment.