Skip to content

Commit 65cb10c

Browse files
committed
feat(apps/prod/publisher): add delivery-config ConfigMap and bump image tags (#1752)
This pull request introduces support for injecting a delivery configuration file into the publisher deployments for both production and staging environments. The main changes include adding a `ConfigMap` for delivery configuration, updating deployment manifests to mount this config, and updating application configuration to reference the new file and mirror names. **ConfigMap and Deployment Updates:** * Added a `configMapGenerator` for `delivery-config` in `kustomization.yaml`, which sources the configuration from `config.json`. This allows for centralized management of delivery config data. * Updated both `release-prod-mirror.yaml` and `release-staging-mirror.yaml` to mount the `delivery-config` ConfigMap as a volume at `/etc/config/delivery-config.yaml`, ensuring the application can read its delivery configuration at runtime. [[1]](diffhunk://#diff-a743ba791ced94bd1be5ae9178788eda89579a42e5deb14e63c98148185bbf44R42-R53) [[2]](diffhunk://#diff-6b8d2314aa062e2bcd25495e358ca973d789ea7113fb0f9e539d0e41913e32bcR44-R55) * Updated the image tag for publisher deployments to a newer version in both production and staging manifests. [[1]](diffhunk://#diff-a743ba791ced94bd1be5ae9178788eda89579a42e5deb14e63c98148185bbf44L28-R28) [[2]](diffhunk://#diff-6b8d2314aa062e2bcd25495e358ca973d789ea7113fb0f9e539d0e41913e32bcL28-R28) **Application Configuration Updates:** * Modified both production and staging external secrets configuration files to reference the new delivery config file path in the `tiup` service section. [[1]](diffhunk://#diff-c25037403eaf37c2a6e5cb413a64753299d6021a7f61cac12508325ecc6042b0R26-R28) [[2]](diffhunk://#diff-97f2467e2edadfe8bc005756c9e68c8f0b8867a0c7b51cd35349c36f043534beR26-R28) * Added explicit `mirror_name` values for both environments in the `tiup` options, improving clarity and environment-specific configuration. [[1]](diffhunk://#diff-c25037403eaf37c2a6e5cb413a64753299d6021a7f61cac12508325ecc6042b0R38) [[2]](diffhunk://#diff-97f2467e2edadfe8bc005756c9e68c8f0b8867a0c7b51cd35349c36f043534beR38)
1 parent 6065a51 commit 65cb10c

File tree

10 files changed

+71
-4
lines changed

10 files changed

+71
-4
lines changed

apps/prod2/publisher/kustomization.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ namespace: publisher
44
resources:
55
- namespace.yaml
66
- pre.yaml
7-
- release-prod-mirror.yaml
8-
- release-staging-mirror.yaml
7+
- releases.yaml
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
3+
kind: Kustomization
4+
metadata:
5+
name: publisher-packages-config
6+
spec:
7+
targetNamespace: publisher
8+
interval: 5m0s
9+
sourceRef:
10+
kind: GitRepository
11+
name: artifacts
12+
namespace: flux-system
13+
path: ./packages
14+
prune: true

apps/prod2/publisher/pre/external-secrets/publisher-config-prod.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ spec:
2323
addr: "redis-master:6379"
2424
db: 0
2525
password: {{ .redis_password }}
26+
services:
27+
tiup:
28+
delivery_config_file: "/etc/config/delivery.yaml" # should load from config map
2629
worker.yaml: |
2730
tiup:
2831
kafka:
@@ -32,6 +35,7 @@ spec:
3235
consumer_group: publisher-prod-tiup
3336
3437
options:
38+
mirror_name: prod
3539
mirror_url: {{ .tiup_mirror_url}}
3640
lark_webhook_url: {{ .lark_webhook_url }}
3741
nightly_interval: 12h

apps/prod2/publisher/pre/external-secrets/publisher-config-staging.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ spec:
2323
addr: "redis-master:6379"
2424
db: 0
2525
password: {{ .redis_password }}
26+
services:
27+
tiup:
28+
delivery_config_file: "/etc/config/delivery.yaml" # should load from config map
2629
worker.yaml: |
2730
tiup:
2831
kafka:
@@ -32,6 +35,7 @@ spec:
3235
consumer_group: publisher-staging-tiup
3336
3437
options:
38+
mirror_name: staging
3539
mirror_url: {{ .tiup_mirror_url}}
3640
lark_webhook_url: {{ .lark_webhook_url }}
3741
nightly_interval: 12h

apps/prod2/publisher/pre/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
namespace: publisher
44
resources:
5+
# Please do not change the order of these resources.
56
- redis
67
- kafka
8+
- config.yaml
79
- external-secrets

apps/prod2/publisher/releases.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
3+
kind: Kustomization
4+
metadata:
5+
name: publisher-releases
6+
spec:
7+
dependsOn:
8+
- name: publisher-pre
9+
targetNamespace: publisher
10+
interval: 5m0s
11+
sourceRef:
12+
kind: GitRepository
13+
name: flux-system
14+
namespace: flux-system
15+
path: ./apps/prod2/publisher/releases
16+
prune: true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- prod-mirror.yaml
5+
- staging-mirror.yaml

apps/prod2/publisher/release-prod-mirror.yaml renamed to apps/prod2/publisher/releases/prod-mirror.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
# Additional volumes on the output Deployment definition.
2626
image:
2727
# renovate: datasource=docker depName=ghcr.io/pingcap-qe/ee-apps/publisher versioning=semver
28-
tag: v2025.11.2-1-g43046ac
28+
tag: v2025.11.30-2-gde42167
2929
servers:
3030
publisher:
3131
config:
@@ -39,11 +39,17 @@ spec:
3939
- name: tiup-credentials
4040
secret:
4141
secretName: tiup-credentials-prod
42+
- name: packages-config
43+
configMap:
44+
name: packages-config
4245
volumeMounts:
4346
- name: tiup-credentials
4447
subPath: private.json
4548
mountPath: /root/.tiup/keys/private.json
4649
readOnly: true
50+
- name: packages-config
51+
mountPath: /etc/config
52+
readOnly: true
4753
ingress:
4854
enabled: true
4955
className: "nginx"

apps/prod2/publisher/release-staging-mirror.yaml renamed to apps/prod2/publisher/releases/staging-mirror.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
# Additional volumes on the output Deployment definition.
2626
image:
2727
# renovate: datasource=docker depName=ghcr.io/pingcap-qe/ee-apps/publisher versioning=semver
28-
tag: v2025.11.2-1-g43046ac
28+
tag: v2025.11.30-2-gde42167
2929
servers:
3030
publisher:
3131
config:
@@ -41,11 +41,17 @@ spec:
4141
- name: tiup-credentials
4242
secret:
4343
secretName: tiup-credentials-staging
44+
- name: packages-config
45+
configMap:
46+
name: packages-config
4447
volumeMounts:
4548
- name: tiup-credentials
4649
subPath: private.json
4750
mountPath: /root/.tiup/keys/private.json
4851
readOnly: true
52+
- name: packages-config
53+
mountPath: /etc/config
54+
readOnly: true
4955
ingress:
5056
enabled: true
5157
className: "nginx"

clusters/prod2/sources.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,14 @@ spec:
88
ref:
99
branch: main
1010
url: https://github.com/PingCAP-QE/ci.git
11+
---
12+
apiVersion: source.toolkit.fluxcd.io/v1beta2
13+
kind: GitRepository
14+
metadata:
15+
name: artifacts
16+
namespace: flux-system
17+
spec:
18+
interval: 1m0s
19+
ref:
20+
branch: main
21+
url: https://github.com/PingCAP-QE/artifacts.git

0 commit comments

Comments
 (0)