feat(test-env): add 1C test environment (#11)
* feat(test-env): add 1C test environment manifests (#11) - PostgreSQL 18.x-2.1C StatefulSet with ru_RU.UTF-8 locale init - 1C server (ragent+crserver+ras) StatefulSet with stable hostname - Gitea runner Deployment with edt label for apk-ci-ng - NodePort services for external 1C access (31540-31545) - Deploy/verify script: dev/deploy-test-env.sh - config.yaml for ApplicationSet integration - test-env only in dev cluster (not in prod AppSet) * fix(test-env): use initContainer for PG data + remove custom entrypoint PVC mount on /var/lib/postgresql wipes the image's pre-built cluster. Solution: initContainer copies cluster data from image to PVC on first run. Removed custom pg-entrypoint.sh ConfigMap — image has its own. * feat(test-env): DinD sidecar for runner + auto-registration Job - Add Docker-in-Docker sidecar to gitea-runner Deployment - Add register-job.yaml: Job that obtains Gitea runner token via API, creates Secret, and scales runner to 1 - RBAC: ServiceAccount + Role/ClusterRole for cross-namespace secret access - Runner labels: edt (for apk-ci-ng), ubuntu-latest --------- Co-authored-by: XoR <xor@benadis.ru>
This commit is contained in:
107
test-env/onec-server/statefulset.yaml
Normal file
107
test-env/onec-server/statefulset.yaml
Normal file
@@ -0,0 +1,107 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: onec-server
|
||||
namespace: test-env
|
||||
labels:
|
||||
app: onec-server
|
||||
spec:
|
||||
serviceName: onec-server
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: onec-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: onec-server
|
||||
spec:
|
||||
# Stable hostname for 1C community license (tied to hostname, not hardware)
|
||||
hostname: test-env-0
|
||||
containers:
|
||||
- name: onec
|
||||
image: benadis/ar-edt:6.2.27.1
|
||||
command: ["/scripts/entrypoint.sh"]
|
||||
env:
|
||||
- name: LANG
|
||||
value: "ru_RU.UTF-8"
|
||||
- name: LC_ALL
|
||||
value: "ru_RU.UTF-8"
|
||||
- name: TZ
|
||||
value: "Europe/Moscow"
|
||||
- name: PGHOST
|
||||
value: "postgres.test-env.svc.cluster.local"
|
||||
- name: PGPORT
|
||||
value: "5432"
|
||||
- name: PGUSER
|
||||
value: "usr1cv8"
|
||||
- name: PGPASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: test-env-secrets
|
||||
key: pg-password
|
||||
ports:
|
||||
- name: ragent
|
||||
containerPort: 1540
|
||||
protocol: TCP
|
||||
- name: regport
|
||||
containerPort: 1541
|
||||
protocol: TCP
|
||||
- name: crserver
|
||||
containerPort: 1542
|
||||
protocol: TCP
|
||||
- name: ras
|
||||
containerPort: 1545
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: onec-data
|
||||
mountPath: /data
|
||||
- name: onec-scripts
|
||||
mountPath: /scripts
|
||||
readOnly: true
|
||||
- name: onec-nethasp
|
||||
mountPath: /opt/1cv8/conf/nethasp.ini
|
||||
subPath: nethasp.ini
|
||||
readOnly: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: "4"
|
||||
memory: 4Gi
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["sh", "-c", "pgrep ragent && pgrep crserver"]
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["sh", "-c", "pgrep ragent"]
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
volumes:
|
||||
- name: onec-scripts
|
||||
configMap:
|
||||
name: onec-config
|
||||
items:
|
||||
- key: entrypoint.sh
|
||||
path: entrypoint.sh
|
||||
mode: 0755
|
||||
- name: onec-nethasp
|
||||
configMap:
|
||||
name: onec-config
|
||||
items:
|
||||
- key: nethasp.ini
|
||||
path: nethasp.ini
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: onec-data
|
||||
spec:
|
||||
storageClassName: local-path
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
Reference in New Issue
Block a user