summaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorDaniel Milaszkiewicz <daniel.milaszkiewicz@nokia.com>2020-11-16 13:50:18 +0000
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-11-18 15:00:32 +0000
commitbc6dc8bff8c6b54e4741d24236710539187b1484 (patch)
tree910ff52e756e9b6bc5f57d94ea575f1aa8528eab /kubernetes
parent0c4f44f98e3deae648fbe129c9081b25fb9ad74c (diff)
Revert "[CONSUL] Make consul run as non-root"
Revert submission 114556 Reason for revert: Bug - OOM-2630 Reverted Changes: Ic1302ac28:[CONSUL] Make consul server run as non-root I43584b7f0:[CONSUL] Make consul run as non-root Issue-ID: OOM-2630 Change-Id: Ie80d50417418d182f3db54d103bac50dde0c6775 Signed-off-by: Daniel Milaszkiewicz <daniel.milaszkiewicz@nokia.com> (cherry picked from commit 55913091b7deb8f73c026c53826608c8f7b51f17)
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/consul/templates/deployment.yaml37
-rw-r--r--kubernetes/consul/values.yaml7
2 files changed, 9 insertions, 35 deletions
diff --git a/kubernetes/consul/templates/deployment.yaml b/kubernetes/consul/templates/deployment.yaml
index 6f1c57967f..51c6eb72d5 100644
--- a/kubernetes/consul/templates/deployment.yaml
+++ b/kubernetes/consul/templates/deployment.yaml
@@ -39,34 +39,15 @@ spec:
spec:
imagePullSecrets:
- name: "{{ include "common.namespace" . }}-docker-registry-key"
- initContainers:
- - name: {{ include "common.name" . }}-chown
- image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
- command:
- - sh
- args:
- - -c
- - |
- cp -r -L /tmp/consul/config/* /consul/config/
- chown -R {{ .Values.consulUID }}:{{ .Values.consulGID }} /consul/config
- ls -la /consul/config
- volumeMounts:
- - mountPath: /tmp/consul/config
- name: consul-agent-config
- - mountPath: /consul/config
- name: consul-agent-config-dir
containers:
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
command:
- - sh
- args:
- - /usr/local/bin/docker-entrypoint.sh
- - agent
- - -client
- - 0.0.0.0
- - -enable-script-checks
- - -retry-join
- - {{ .Values.consulServer.nameOverride }}
+ - /bin/sh
+ - "-c"
+ - |
+ apk update && apk add jq
+ cp /tmp/consul/config/* /consul/config
+ /usr/local/bin/docker-entrypoint.sh agent -client 0.0.0.0 -enable-script-checks -retry-join {{ .Values.consulServer.nameOverride }}
name: {{ include "common.name" . }}
env:
- name: SDNC_ODL_COUNT
@@ -74,16 +55,14 @@ spec:
- name: SDNC_IS_PRIMARY_CLUSTER
value: "{{ .Values.sdnc.config.isPrimaryCluster }}"
volumeMounts:
- - mountPath: /consul/config
- name: consul-agent-config-dir
+ - mountPath: /tmp/consul/config
+ name: consul-agent-config
- mountPath: /consul/scripts
name: consul-agent-scripts-config
- mountPath: /consul/certs
name: consul-agent-certs-config
resources: {{ include "common.resources" . | nindent 10 }}
volumes:
- - name: consul-agent-config-dir
- emptyDir: {}
- configMap:
name: {{ include "common.fullname" . }}-configmap
name: consul-agent-config
diff --git a/kubernetes/consul/values.yaml b/kubernetes/consul/values.yaml
index 8f17dc637f..512c4c3dac 100644
--- a/kubernetes/consul/values.yaml
+++ b/kubernetes/consul/values.yaml
@@ -20,24 +20,19 @@ global:
readinessImage: onap/oom/readiness:3.0.1
loggingRepository: docker.elastic.co
loggingImage: beats/filebeat:5.5.0
- busyboxRepository: registry.hub.docker.com
- busyboxImage: library/busybox:latest
#################################################################
# Application configuration defaults.
#################################################################
# application image
repository: docker.io
-image: oomk8s/consul:2.0.0
+image: oomk8s/consul:1.0.0
pullPolicy: Always
#subchart name
consulServer:
nameOverride: consul-server
-consulUID: 100
-consulGID: 1000
-
# flag to enable debugging - application support required
debugEnabled: false
' href='#n337'>337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558