Skip to content

Commit 2d5025c

Browse files
authored
[DPE-1423] Update ocean-kubernetes-controller version to 0.1.66 (#73)
* update ocean-kubernetes-controller version to 0.1.66 * Add user data configuration for EKS node autoscaler and define VPC data source
1 parent b07620f commit 2d5025c

File tree

2 files changed

+67
-14
lines changed

2 files changed

+67
-14
lines changed

modules/sage-aws-k8s-node-autoscaler/main.tf

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ resource "helm_release" "ocean-kubernetes-controller" {
8282
repository = "https://charts.spot.io"
8383
chart = "ocean-kubernetes-controller"
8484
namespace = "spot-system"
85-
version = "0.1.52"
85+
version = "0.1.66"
8686
create_namespace = true
8787

8888
values = [templatefile("${path.module}/templates/values.yaml", {})]
@@ -147,5 +147,25 @@ module "ocean-aws-k8s" {
147147
root_device_types = null
148148
virtualization_types = null
149149
}
150+
151+
user_data = base64encode(<<-EOF
152+
MIME-Version: 1.0
153+
Content-Type: multipart/mixed; boundary="//"
154+
155+
--//
156+
Content-Type: application/node.eks.aws
157+
158+
---
159+
apiVersion: node.eks.aws/v1alpha1
160+
kind: NodeConfig
161+
spec:
162+
cluster:
163+
apiServerEndpoint: ${data.aws_eks_cluster.cluster.endpoint}
164+
certificateAuthority: ${data.aws_eks_cluster.cluster.certificate_authority[0].data}
165+
cidr: ${data.aws_eks_cluster.cluster.kubernetes_network_config[0].service_ipv4_cidr}
166+
name: ${var.cluster_name}
167+
--//--
168+
EOF
169+
)
150170
}
151171

modules/sage-aws-k8s-node-autoscaler/templates/values.yaml

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ spotinst:
88
# -- Spot Token. (Required)
99
# Ref: https://docs.spot.io/administration/api/create-api-token
1010
token: ""
11-
# -- Spot Account. (Required)
12-
# Ref: https://docs.spot.io/administration/organizations?id=account
11+
# -- Spot Account ID. (Required)
12+
# Example: `act-123abcd`
1313
account: ""
1414
# -- Unique identifier used by the Ocean Controller to connect (Required)
1515
# between the Ocean backend and the Kubernetes cluster.
@@ -25,15 +25,25 @@ spotinst:
2525
enableCsrApproval: true
2626
# -- Disable automatic RightSizing. (Optional)
2727
disableAutomaticRightSizing: false
28+
# -- Disable TLS certificate validation. (Optional)
29+
insecureSkipTLSVerify: false
30+
# -- Sets the controller to read-only mode, removing write permissions and disabling autoscaling. (Optional)
31+
readonly: false
2832

2933
# -- Configure the amount of replicas for the controller (Optional)
3034
replicas: 2
3135

3236
image:
3337
repository: us-docker.pkg.dev/spotit-today/container-labs/spotinst-kubernetes-controller
3438
pullPolicy: IfNotPresent
35-
# Overrides the image tag whose default is the chart appVersion.
39+
# -- Overrides the image tag whose default is the chart appVersion.
3640
tag: ""
41+
# -- Set to `true` to use an FIPS-140 compliant image. This flag adds `-fips` suffix to the image tag,
42+
# therefore it should not be used together with the `--image.tag` flag.
43+
# Ref: https://go.dev/doc/security/fips140
44+
fips: false
45+
46+
initContainers: []
3747

3848
imagePullSecrets: []
3949

@@ -79,9 +89,9 @@ commonLabels: {}
7989
# Ref: https://kubernetes.io/docs/concepts/security/pod-security-standards/
8090
podSecurityContext:
8191
runAsNonRoot: true
82-
runAsUser: 10001
83-
runAsGroup: 10001
84-
fsGroup: 10001
92+
runAsUser: 1000690000
93+
runAsGroup: 1000690000
94+
fsGroup: 1000690000
8595

8696
# -- Priority class name for the controller pod.
8797
priorityClassName: system-node-critical
@@ -100,6 +110,8 @@ securityContext:
100110
drop:
101111
- ALL
102112

113+
command: []
114+
103115
args: []
104116
# - --test
105117

@@ -190,8 +202,7 @@ metrics-server:
190202
pullPolicy: IfNotPresent
191203

192204
# -- Arguments to pass to metrics-server on start up. (Optional)
193-
args:
194-
- --logtostderr
205+
# args:
195206
# enable this if you have self-signed certificates, see: https://github.com/kubernetes-incubator/metrics-server
196207
# - --kubelet-insecure-tls
197208

@@ -200,10 +211,12 @@ logShipping:
200211
# -- Specifies whether to send the controller logs to Spot for analysis. (Optional)
201212
enabled: false
202213

203-
# -- Specifies the log shipping container image. (Optional)
204214
image:
215+
# -- Image repository. (Optional)
205216
repository: ghcr.io/fluent/fluent-bit
206-
tag: "3.0.7"
217+
# -- Overrides the image tag. (Optional)
218+
tag: "3.1.9"
219+
# -- Image pull policy. (Optional)
207220
pullPolicy: IfNotPresent
208221

209222
# -- Log shipping destination configuration.
@@ -212,6 +225,26 @@ logShipping:
212225
port: 443
213226
tls: true
214227

228+
extraVolumeMounts: []
229+
230+
extraEnv: []
231+
232+
# -- Log shipping container command. (Optional)
233+
command:
234+
- /fluent-bit/bin/fluent-bit
235+
- -c
236+
- /tmp/fluent-bit.conf
237+
- -q
238+
239+
# -- Log Shipping container security context
240+
securityContext:
241+
allowPrivilegeEscalation: false
242+
readOnlyRootFilesystem: true
243+
runAsNonRoot: true
244+
capabilities:
245+
drop:
246+
- ALL
247+
215248
# Auto Update process configuration.
216249
autoUpdate:
217250
# -- Configures the image for the auto-updater job. (Optional)
@@ -230,9 +263,9 @@ autoUpdate:
230263
# Ref: https://kubernetes.io/docs/concepts/security/pod-security-standards/
231264
podSecurityContext:
232265
runAsNonRoot: true
233-
runAsUser: 10001
234-
runAsGroup: 10001
235-
fsGroup: 10001
266+
runAsUser: 1000690000
267+
runAsGroup: 1000690000
268+
fsGroup: 1000690000
236269

237270
# -- Security Context for the auto-updater container. (Optional)
238271
securityContext:

0 commit comments

Comments
 (0)