Skip to content

Commit

Permalink
chore: adjust after rebase main
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Aug 8, 2024
1 parent f708ada commit 859194e
Show file tree
Hide file tree
Showing 21 changed files with 322 additions and 72 deletions.
27 changes: 21 additions & 6 deletions cmd/template_lagoonservices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,22 @@ func TestTemplateLagoonServices(t *testing.T) {
want: "internal/testdata/complex/service-templates/service4",
},
{
name: "test10 basic-persistent deployment multiple volumes",
name: "test10 basic deployment polysite cronjobs",
args: testdata.GetSeedData(
testdata.TestData{
ProjectName: "example-project",
EnvironmentName: "main",
Branch: "main",
LagoonYAML: "internal/testdata/basic/lagoon.polysite-cronjobs.yml",
ImageReferences: map[string]string{
"node": "harbor.example/example-project/main/node@sha256:b2001babafaa8128fe89aa8fd11832cade59931d14c3de5b3ca32e2a010fbaa8",
},
}, true),
templatePath: "testoutput",
want: "internal/testdata/basic/service-templates/service7",
},
{
name: "test11 basic-persistent deployment multiple volumes",
args: testdata.GetSeedData(
testdata.TestData{
ProjectName: "example-project",
Expand All @@ -323,10 +338,10 @@ func TestTemplateLagoonServices(t *testing.T) {
},
}, true),
templatePath: "testoutput",
want: "internal/testdata/basic/service-templates/service7",
want: "internal/testdata/basic/service-templates/service8",
},
{
name: "test11 basic deployment multiple volumes",
name: "test12 basic deployment multiple volumes",
args: testdata.GetSeedData(
testdata.TestData{
ProjectName: "example-project",
Expand All @@ -339,10 +354,10 @@ func TestTemplateLagoonServices(t *testing.T) {
},
}, true),
templatePath: "testoutput",
want: "internal/testdata/basic/service-templates/service8",
want: "internal/testdata/basic/service-templates/service9",
},
{
name: "test12 complex deployment multiple volumes",
name: "test13 complex deployment multiple volumes",
args: testdata.GetSeedData(
testdata.TestData{
ProjectName: "example-project",
Expand All @@ -360,7 +375,7 @@ func TestTemplateLagoonServices(t *testing.T) {
},
}, true),
templatePath: "testoutput",
want: "internal/testdata/complex/service-templates/service5",
want: "internal/testdata/complex/service-templates/service6",
},
}
for _, tt := range tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ metadata:
labels:
app.kubernetes.io/instance: node
app.kubernetes.io/managed-by: build-deploy-tool
app.kubernetes.io/name: basic-persistent
app.kubernetes.io/name: basic
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/project: example-project
lagoon.sh/service: node
lagoon.sh/service-type: basic-persistent
lagoon.sh/template: basic-persistent-0.1.0
lagoon.sh/service-type: basic
lagoon.sh/template: basic-0.1.0
name: node
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: node
app.kubernetes.io/name: basic-persistent
app.kubernetes.io/name: basic
strategy: {}
template:
metadata:
Expand All @@ -35,20 +35,22 @@ spec:
labels:
app.kubernetes.io/instance: node
app.kubernetes.io/managed-by: build-deploy-tool
app.kubernetes.io/name: basic-persistent
app.kubernetes.io/name: basic
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/project: example-project
lagoon.sh/service: node
lagoon.sh/service-type: basic-persistent
lagoon.sh/template: basic-persistent-0.1.0
lagoon.sh/service-type: basic
lagoon.sh/template: basic-0.1.0
spec:
containers:
- env:
- name: LAGOON_GIT_SHA
value: abcdefg123456
- name: CRONJOBS
value: |
3,18,33,48 0 * * * drush cron
- name: SERVICE_NAME
value: node
envFrom:
Expand All @@ -59,42 +61,31 @@ spec:
livenessProbe:
initialDelaySeconds: 60
tcpSocket:
port: 3000
port: 1234
timeoutSeconds: 10
name: basic
ports:
- containerPort: 3000
name: http
- containerPort: 1234
name: tcp-1234
protocol: TCP
- containerPort: 8191
name: tcp-8191
protocol: TCP
- containerPort: 9001
name: udp-9001
protocol: UDP
readinessProbe:
initialDelaySeconds: 1
tcpSocket:
port: 3000
port: 1234
timeoutSeconds: 1
resources:
requests:
cpu: 10m
memory: 10Mi
securityContext: {}
volumeMounts:
- mountPath: /config
name: custom-config
- mountPath: /app/files/
name: custom-files
- mountPath: /data
name: node
enableServiceLinks: false
imagePullSecrets:
- name: lagoon-internal-registry-secret
priorityClassName: lagoon-priority-production
volumes:
- name: custom-config
persistentVolumeClaim:
claimName: custom-config
- name: custom-files
persistentVolumeClaim:
claimName: custom-files
- name: node
persistentVolumeClaim:
claimName: node
status: {}
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,31 @@ metadata:
labels:
app.kubernetes.io/instance: node
app.kubernetes.io/managed-by: build-deploy-tool
app.kubernetes.io/name: basic-persistent
app.kubernetes.io/name: basic
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/project: example-project
lagoon.sh/service: node
lagoon.sh/service-type: basic-persistent
lagoon.sh/template: basic-persistent-0.1.0
lagoon.sh/service-type: basic
lagoon.sh/template: basic-0.1.0
name: node
spec:
ports:
- name: http
port: 3000
- name: tcp-1234
port: 1234
protocol: TCP
targetPort: http
targetPort: tcp-1234
- name: tcp-8191
port: 8191
protocol: TCP
targetPort: tcp-8191
- name: udp-9001
port: 9001
protocol: UDP
targetPort: udp-9001
selector:
app.kubernetes.io/instance: node
app.kubernetes.io/name: basic-persistent
app.kubernetes.io/name: basic
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ metadata:
labels:
app.kubernetes.io/instance: node
app.kubernetes.io/managed-by: build-deploy-tool
app.kubernetes.io/name: basic
app.kubernetes.io/name: basic-persistent
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/project: example-project
lagoon.sh/service: node
lagoon.sh/service-type: basic
lagoon.sh/template: basic-0.1.0
lagoon.sh/service-type: basic-persistent
lagoon.sh/template: basic-persistent-0.1.0
name: node
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: node
app.kubernetes.io/name: basic
app.kubernetes.io/name: basic-persistent
strategy: {}
template:
metadata:
Expand All @@ -35,14 +35,14 @@ spec:
labels:
app.kubernetes.io/instance: node
app.kubernetes.io/managed-by: build-deploy-tool
app.kubernetes.io/name: basic
app.kubernetes.io/name: basic-persistent
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/project: example-project
lagoon.sh/service: node
lagoon.sh/service-type: basic
lagoon.sh/template: basic-0.1.0
lagoon.sh/service-type: basic-persistent
lagoon.sh/template: basic-persistent-0.1.0
spec:
containers:
- env:
Expand Down Expand Up @@ -77,24 +77,24 @@ spec:
memory: 10Mi
securityContext: {}
volumeMounts:
- mountPath: /data
name: custom-node
- mountPath: /config
name: custom-config
- mountPath: /app/files/
name: custom-files
- mountPath: /data
name: node
enableServiceLinks: false
imagePullSecrets:
- name: lagoon-internal-registry-secret
priorityClassName: lagoon-priority-production
volumes:
- name: custom-node
persistentVolumeClaim:
claimName: custom-node
- name: custom-config
persistentVolumeClaim:
claimName: custom-config
- name: custom-files
persistentVolumeClaim:
claimName: custom-files
- name: node
persistentVolumeClaim:
claimName: node
status: {}
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ metadata:
labels:
app.kubernetes.io/instance: node
app.kubernetes.io/managed-by: build-deploy-tool
app.kubernetes.io/name: basic
app.kubernetes.io/name: basic-persistent
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/project: example-project
lagoon.sh/service: node
lagoon.sh/service-type: basic
lagoon.sh/template: basic-0.1.0
lagoon.sh/service-type: basic-persistent
lagoon.sh/template: basic-persistent-0.1.0
name: node
spec:
ports:
Expand All @@ -26,6 +26,6 @@ spec:
targetPort: http
selector:
app.kubernetes.io/instance: node
app.kubernetes.io/name: basic
app.kubernetes.io/name: basic-persistent
status:
loadBalancer: {}
Loading

0 comments on commit 859194e

Please sign in to comment.