Skip to content

Commit

Permalink
chore: remove open/elasticsearch init container
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Nov 24, 2024
1 parent 72bcaf0 commit 10af9ef
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 154 deletions.
23 changes: 0 additions & 23 deletions internal/servicetypes/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package servicetypes
import (
"fmt"

"github.com/uselagoon/build-deploy-tool/internal/helpers"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -72,28 +71,6 @@ var elasticsearch = ServiceType{
},
},
},
InitContainer: ServiceContainer{
Name: "set-max-map-count",
Command: []string{
"sh",
"-c",
`set -xe
DESIRED="262144"
CURRENT=$(sysctl -n vm.max_map_count)
if [ "$DESIRED" -gt "$CURRENT" ]; then
sysctl -w vm.max_map_count=$DESIRED
fi`,
},
Container: corev1.Container{
Name: "set-max-map-count",
Image: "library/busybox:latest",
ImagePullPolicy: corev1.PullIfNotPresent,
SecurityContext: &corev1.SecurityContext{
Privileged: helpers.BoolPtr(true),
RunAsUser: helpers.Int64Ptr(0),
},
},
},
PodSecurityContext: ServicePodSecurityContext{
HasDefault: true,
FSGroup: 0,
Expand Down
23 changes: 0 additions & 23 deletions internal/servicetypes/opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package servicetypes
import (
"fmt"

"github.com/uselagoon/build-deploy-tool/internal/helpers"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -72,28 +71,6 @@ var opensearch = ServiceType{
},
},
},
InitContainer: ServiceContainer{
Name: "set-max-map-count",
Command: []string{
"sh",
"-c",
`set -xe
DESIRED="262144"
CURRENT=$(sysctl -n vm.max_map_count)
if [ "$DESIRED" -gt "$CURRENT" ]; then
sysctl -w vm.max_map_count=$DESIRED
fi`,
},
Container: corev1.Container{
Name: "set-max-map-count",
Image: "library/busybox:latest",
ImagePullPolicy: corev1.PullIfNotPresent,
SecurityContext: &corev1.SecurityContext{
Privileged: helpers.BoolPtr(true),
RunAsUser: helpers.Int64Ptr(0),
},
},
},
PodSecurityContext: ServicePodSecurityContext{
HasDefault: true,
FSGroup: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,6 @@ spec:
enableServiceLinks: false
imagePullSecrets:
- name: lagoon-internal-registry-secret
initContainers:
- command:
- sh
- -c
- |-
set -xe
DESIRED="262144"
CURRENT=$(sysctl -n vm.max_map_count)
if [ "$DESIRED" -gt "$CURRENT" ]; then
sysctl -w vm.max_map_count=$DESIRED
fi
image: library/busybox:latest
imagePullPolicy: IfNotPresent
name: set-max-map-count
resources: {}
securityContext:
privileged: true
runAsUser: 0
priorityClassName: lagoon-priority-production
securityContext:
fsGroup: 0
Expand Down Expand Up @@ -201,24 +183,6 @@ spec:
enableServiceLinks: false
imagePullSecrets:
- name: lagoon-internal-registry-secret
initContainers:
- command:
- sh
- -c
- |-
set -xe
DESIRED="262144"
CURRENT=$(sysctl -n vm.max_map_count)
if [ "$DESIRED" -gt "$CURRENT" ]; then
sysctl -w vm.max_map_count=$DESIRED
fi
image: library/busybox:latest
imagePullPolicy: IfNotPresent
name: set-max-map-count
resources: {}
securityContext:
privileged: true
runAsUser: 0
priorityClassName: lagoon-priority-production
securityContext:
fsGroup: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,6 @@ spec:
enableServiceLinks: false
imagePullSecrets:
- name: lagoon-internal-registry-secret
initContainers:
- command:
- sh
- -c
- |-
set -xe
DESIRED="262144"
CURRENT=$(sysctl -n vm.max_map_count)
if [ "$DESIRED" -gt "$CURRENT" ]; then
sysctl -w vm.max_map_count=$DESIRED
fi
image: library/busybox:latest
imagePullPolicy: IfNotPresent
name: set-max-map-count
resources: {}
securityContext:
privileged: true
runAsUser: 0
priorityClassName: lagoon-priority-production
securityContext:
fsGroup: 0
Expand Down Expand Up @@ -201,24 +183,6 @@ spec:
enableServiceLinks: false
imagePullSecrets:
- name: lagoon-internal-registry-secret
initContainers:
- command:
- sh
- -c
- |-
set -xe
DESIRED="262144"
CURRENT=$(sysctl -n vm.max_map_count)
if [ "$DESIRED" -gt "$CURRENT" ]; then
sysctl -w vm.max_map_count=$DESIRED
fi
image: library/busybox:latest
imagePullPolicy: IfNotPresent
name: set-max-map-count
resources: {}
securityContext:
privileged: true
runAsUser: 0
priorityClassName: lagoon-priority-production
securityContext:
fsGroup: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,6 @@ spec:
enableServiceLinks: false
imagePullSecrets:
- name: lagoon-internal-registry-secret
initContainers:
- command:
- sh
- -c
- |-
set -xe
DESIRED="262144"
CURRENT=$(sysctl -n vm.max_map_count)
if [ "$DESIRED" -gt "$CURRENT" ]; then
sysctl -w vm.max_map_count=$DESIRED
fi
image: library/busybox:latest
imagePullPolicy: IfNotPresent
name: set-max-map-count
resources: {}
securityContext:
privileged: true
runAsUser: 0
priorityClassName: lagoon-priority-production
securityContext:
fsGroup: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,6 @@ spec:
enableServiceLinks: false
imagePullSecrets:
- name: lagoon-internal-registry-secret
initContainers:
- command:
- sh
- -c
- |-
set -xe
DESIRED="262144"
CURRENT=$(sysctl -n vm.max_map_count)
if [ "$DESIRED" -gt "$CURRENT" ]; then
sysctl -w vm.max_map_count=$DESIRED
fi
image: library/busybox:latest
imagePullPolicy: IfNotPresent
name: set-max-map-count
resources: {}
securityContext:
privileged: true
runAsUser: 0
priorityClassName: lagoon-priority-production
securityContext:
fsGroup: 0
Expand Down

0 comments on commit 10af9ef

Please sign in to comment.