fix
This commit is contained in:
@@ -31,3 +31,19 @@ resource "kubectl_manifest" "server_start" {
|
|||||||
/bin/woodpecker-server "$@"
|
/bin/woodpecker-server "$@"
|
||||||
EOF
|
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
|
- name: agent
|
||||||
image: "${var.images.agent.registry}/${var.images.agent.repository}:${var.images.agent.tag}"
|
image: "${var.images.agent.registry}/${var.images.agent.repository}:${var.images.agent.tag}"
|
||||||
imagePullPolicy: "${var.images.agent.pull_policy}"
|
imagePullPolicy: "${var.images.agent.pull_policy}"
|
||||||
|
command: ["/usr/local/bin/start.sh"]
|
||||||
env:
|
env:
|
||||||
- name: WOODPECKER_BACKEND_K8S_NAMESPACE
|
- name: WOODPECKER_BACKEND_K8S_NAMESPACE
|
||||||
value: "${var.namespace}"
|
value: "${var.namespace}"
|
||||||
@@ -72,6 +73,22 @@ data "kustomization_overlay" "data" {
|
|||||||
value: "${var.storage.agent.size}"
|
value: "${var.storage.agent.size}"
|
||||||
- name: WOODPECKER_SERVER
|
- name: WOODPECKER_SERVER
|
||||||
value: "woodpecker-server.${var.namespace}.svc:9000"
|
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
|
EOF
|
||||||
}
|
}
|
||||||
patches {
|
patches {
|
||||||
|
|||||||
@@ -6,26 +6,16 @@ metadata:
|
|||||||
name: woodpecker
|
name: woodpecker
|
||||||
description: null
|
description: null
|
||||||
options:
|
options:
|
||||||
sub_domain:
|
admin-users:
|
||||||
default: ci
|
default: woodpecker,admin
|
||||||
examples:
|
examples:
|
||||||
- ci
|
- woodpecker,admin
|
||||||
type: string
|
|
||||||
issuer:
|
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
type: string
|
||||||
domain_name:
|
domain_name:
|
||||||
default: your_company.com
|
default: your_company.com
|
||||||
examples:
|
examples:
|
||||||
- your_company.com
|
- your_company.com
|
||||||
type: string
|
type: string
|
||||||
ingress_class:
|
|
||||||
default: traefik
|
|
||||||
examples:
|
|
||||||
- traefik
|
|
||||||
type: string
|
|
||||||
storage:
|
storage:
|
||||||
default:
|
default:
|
||||||
agent:
|
agent:
|
||||||
@@ -81,15 +71,35 @@ options:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
app_group:
|
timeouts:
|
||||||
default: dev
|
default:
|
||||||
|
default: '60'
|
||||||
|
max: '120'
|
||||||
examples:
|
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
|
type: string
|
||||||
admin-users:
|
issuer:
|
||||||
default: woodpecker,admin
|
default: letsencrypt-prod
|
||||||
examples:
|
examples:
|
||||||
- woodpecker,admin
|
- letsencrypt-prod
|
||||||
|
type: string
|
||||||
|
ingress_class:
|
||||||
|
default: traefik
|
||||||
|
examples:
|
||||||
|
- traefik
|
||||||
type: string
|
type: string
|
||||||
images:
|
images:
|
||||||
default:
|
default:
|
||||||
@@ -188,25 +198,15 @@ options:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
timeouts:
|
sub_domain:
|
||||||
default:
|
default: ci
|
||||||
default: '60'
|
|
||||||
max: '120'
|
|
||||||
examples:
|
examples:
|
||||||
- default: '60'
|
- ci
|
||||||
max: '120'
|
type: string
|
||||||
properties:
|
app_group:
|
||||||
default:
|
default: dev
|
||||||
default: '60'
|
|
||||||
type: string
|
|
||||||
max:
|
|
||||||
default: '120'
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
domain:
|
|
||||||
default: your-company
|
|
||||||
examples:
|
examples:
|
||||||
- your-company
|
- dev
|
||||||
type: string
|
type: string
|
||||||
dependencies:
|
dependencies:
|
||||||
- dist: null
|
- dist: null
|
||||||
|
|||||||
Reference in New Issue
Block a user