fix
This commit is contained in:
@@ -31,3 +31,19 @@ resource "kubectl_manifest" "server_start" {
|
||||
/bin/woodpecker-server "$@"
|
||||
EOF
|
||||
}
|
||||
resource "kubectl_manifest" "agent_start" {
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "${var.instance}-${var.component}-agent-start"
|
||||
namespace: "${var.namespace}"
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
data:
|
||||
"start.sh": |-
|
||||
#!/bin/ash
|
||||
cp /etc/local-ca/ca.crt /usr/local/share/ca-certificates/
|
||||
update-ca-certificates
|
||||
/bin/woodpecker-agent "$@"
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ data "kustomization_overlay" "data" {
|
||||
- name: agent
|
||||
image: "${var.images.agent.registry}/${var.images.agent.repository}:${var.images.agent.tag}"
|
||||
imagePullPolicy: "${var.images.agent.pull_policy}"
|
||||
command: ["/usr/local/bin/start.sh"]
|
||||
env:
|
||||
- name: WOODPECKER_BACKEND_K8S_NAMESPACE
|
||||
value: "${var.namespace}"
|
||||
@@ -72,6 +73,22 @@ data "kustomization_overlay" "data" {
|
||||
value: "${var.storage.agent.size}"
|
||||
- name: WOODPECKER_SERVER
|
||||
value: "woodpecker-server.${var.namespace}.svc:9000"
|
||||
volumeMounts:
|
||||
- name: certs
|
||||
mountPath: /etc/local-ca
|
||||
readOnly: true
|
||||
- name: config
|
||||
mountPath: "/usr/local/bin/start.sh"
|
||||
subPath: "start.sh"
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: "${var.instance}-${var.component}-server-start"
|
||||
defaultMode: 0777
|
||||
- name: certs
|
||||
secret:
|
||||
secretName: "${var.instance}-cert"
|
||||
defaultMode: 0444
|
||||
EOF
|
||||
}
|
||||
patches {
|
||||
|
||||
@@ -6,26 +6,16 @@ metadata:
|
||||
name: woodpecker
|
||||
description: null
|
||||
options:
|
||||
sub_domain:
|
||||
default: ci
|
||||
admin-users:
|
||||
default: woodpecker,admin
|
||||
examples:
|
||||
- ci
|
||||
type: string
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
- woodpecker,admin
|
||||
type: string
|
||||
domain_name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
ingress_class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
storage:
|
||||
default:
|
||||
agent:
|
||||
@@ -81,15 +71,35 @@ options:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
app_group:
|
||||
default: dev
|
||||
timeouts:
|
||||
default:
|
||||
default: '60'
|
||||
max: '120'
|
||||
examples:
|
||||
- dev
|
||||
- default: '60'
|
||||
max: '120'
|
||||
properties:
|
||||
default:
|
||||
default: '60'
|
||||
type: string
|
||||
max:
|
||||
default: '120'
|
||||
type: string
|
||||
type: object
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
admin-users:
|
||||
default: woodpecker,admin
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- woodpecker,admin
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
ingress_class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
images:
|
||||
default:
|
||||
@@ -188,25 +198,15 @@ options:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
timeouts:
|
||||
default:
|
||||
default: '60'
|
||||
max: '120'
|
||||
sub_domain:
|
||||
default: ci
|
||||
examples:
|
||||
- default: '60'
|
||||
max: '120'
|
||||
properties:
|
||||
default:
|
||||
default: '60'
|
||||
type: string
|
||||
max:
|
||||
default: '120'
|
||||
type: string
|
||||
type: object
|
||||
domain:
|
||||
default: your-company
|
||||
- ci
|
||||
type: string
|
||||
app_group:
|
||||
default: dev
|
||||
examples:
|
||||
- your-company
|
||||
- dev
|
||||
type: string
|
||||
dependencies:
|
||||
- dist: null
|
||||
|
||||
Reference in New Issue
Block a user