Skip to content

Commit d00330e

Browse files
authored
Merge pull request #1083 from lsst-it/IT-6436_nexus_pg
(fleet/nexus-pg) add nexus pg instance cp
2 parents 5ce49a8 + 8369c7a commit d00330e

File tree

6 files changed

+130
-0
lines changed

6 files changed

+130
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
apiVersion: external-secrets.io/v1
3+
kind: ExternalSecret
4+
metadata:
5+
name: nexus-pg
6+
spec:
7+
secretStoreRef:
8+
kind: ClusterSecretStore
9+
name: onepassword
10+
target:
11+
template:
12+
type: kubernetes.io/basic-auth
13+
data:
14+
- secretKey: username
15+
remoteRef:
16+
key: &item nexus-pg
17+
property: username
18+
- secretKey: password
19+
remoteRef:
20+
key: *item
21+
property: password

fleet/lib/nexus-pg/fleet.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
defaultNamespace: &name nexus-pg
3+
namespaceLabels:
4+
lsst.io/discover: "true"
5+
labels:
6+
bundle: *name
7+
helm:
8+
releaseName: *name
9+
timeoutSeconds: 300
10+
waitForJobs: true
11+
dependsOn:
12+
- selector:
13+
matchLabels:
14+
bundle: cnpg-system
15+
- selector:
16+
matchLabels:
17+
bundle: nexus
18+
targetCustomizations:
19+
- name: yepun
20+
clusterSelector:
21+
matchExpressions:
22+
- key: management.cattle.io/cluster-display-name
23+
operator: In
24+
values:
25+
- yepun
26+
yaml:
27+
overlays:
28+
- generic
29+
- yepun
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
apiVersion: external-secrets.io/v1
3+
kind: ExternalSecret
4+
metadata:
5+
name: nexus-pg-superuser
6+
spec:
7+
secretStoreRef:
8+
kind: ClusterSecretStore
9+
name: onepassword
10+
target:
11+
template:
12+
type: kubernetes.io/basic-auth
13+
data:
14+
- secretKey: username
15+
remoteRef:
16+
key: nexus-pg-superuser
17+
property: username
18+
- secretKey: password
19+
remoteRef:
20+
key: nexus-pg-superuser
21+
property: password
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
apiVersion: postgresql.cnpg.io/v1
3+
kind: Cluster
4+
metadata:
5+
name: nexus-pg
6+
spec:
7+
imageName: ghcr.io/cloudnative-pg/postgresql:15
8+
9+
instances: 1
10+
11+
postgresql:
12+
parameters:
13+
max_connections: "50"
14+
shared_buffers: 256MB
15+
idle_session_timeout: 4h
16+
pg_hba:
17+
- host all all 139.229.134.0/23 md5
18+
- host all all 139.229.136.0/21 md5
19+
- host all all 139.229.144.0/20 md5
20+
- host all all 139.229.160.0/19 md5
21+
- host all all 139.229.192.0/18 md5
22+
- host all all 140.252.146.0/23 md5
23+
24+
enableSuperuserAccess: true
25+
superuserSecret:
26+
name: nexus-pg-superuser
27+
28+
storage:
29+
size: 10Gi
30+
31+
monitoring:
32+
enablePodMonitor: true
33+
34+
resources:
35+
limits:
36+
cpu: "1"
37+
memory: 1Gi
38+
requests:
39+
cpu: 500m
40+
memory: 1Gi
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: nexus-pg
6+
labels:
7+
cnpg.io/cluster: nexus-pg
8+
annotations:
9+
metallb.universe.tf/loadBalancerIPs: 139.229.160.133
10+
spec:
11+
ports:
12+
- name: postgres
13+
port: 5432
14+
protocol: TCP
15+
selector:
16+
cnpg.io/cluster: nexus-pg
17+
role: primary
18+
type: LoadBalancer

fleet/s/cp/c/yepun/nexus-pg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../lib/nexus-pg

0 commit comments

Comments
 (0)