Skip to content

Commit 4873d4c

Browse files
author
otomi
committed
fix: settings merge for policies, added runAsNonRoot, shuffled service<>ingress
1 parent e21166a commit 4873d4c

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/openapi/definitions.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,8 @@ ksvcNew:
600600
- properties:
601601
securityContext:
602602
properties:
603+
runAsNonRoot:
604+
$ref: '#/runAsNonRoot'
603605
runAsUser:
604606
$ref: '#/runAsUser'
605607
readOnlyRootFilesystem:
@@ -714,13 +716,10 @@ podSecurityContext:
714716
properties:
715717
runAsUser:
716718
$ref: '#/runAsUser'
717-
description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
718719
runAsGroup:
719720
$ref: '#/runAsGroup'
720-
description: The GID to run the entrypoint of the container process. Defaults to group specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
721721
runAsNonRoot:
722722
$ref: '#/runAsNonRoot'
723-
description: Will prevent any container from starting with UID 0.
724723
fsGroup:
725724
description: Supplementary group ID. Volumes that support ownership management are modified to be owned and writable by this ID.
726725
type: string
@@ -799,25 +798,25 @@ resourceQuota:
799798
required:
800799
- name
801800
- value
801+
runAsNonRoot:
802+
description: Will prevent the container from starting with UID 0. This implies that k8s must be able to infer the UID from the image. If it complains the UID must be explicitly set with runAsUser.
803+
default: true
804+
title: Run as non-root
805+
type: boolean
802806
runAsUser:
803-
description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified.
807+
description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May be set in both SecurityContext and PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
804808
x-default: 1001
805809
maximum: 65535
806810
minimum: 0
807811
title: Run as user
808812
type: integer
809813
runAsGroup:
810-
description: The GID to run the entrypoint of the container process. Defaults to group specified in image metadata if unspecified.
814+
description: The GID to run the entrypoint of the container process. Defaults to group specified in image metadata if unspecified. May be set in both SecurityContext and PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
811815
x-default: 1001
812816
maximum: 65535
813817
minimum: 0
814818
title: Run as group
815819
type: integer
816-
runAsNonRoot:
817-
description: Will prevent the container from starting with UID 0.
818-
default: true
819-
title: Run as non-root
820-
type: boolean
821820
scaling:
822821
description: Min and max number of replicas.
823822
properties:

src/otomi-stack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default class OtomiStack {
124124

125125
setSetting(data: Setting) {
126126
const settings = this.db.db.get('settings').value()
127-
const ret = this.db.db.set('settings', { ...settings, ...data }).write()
127+
const ret = this.db.db.set('settings', merge(settings, data)).write()
128128
this.db.dirty = true
129129
return ret
130130
}

0 commit comments

Comments
 (0)