-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat support security fsgroup (#1613)
* feat: support security context fsgroup Signed-off-by: AhmedGrati <[email protected]> * test: add unit test to security group fsgroup Signed-off-by: AhmedGrati <[email protected]> * test: add functional test to security group fsgroup Signed-off-by: AhmedGrati <[email protected]> * docs: add documentation of the new label of security group fsgroup Signed-off-by: AhmedGrati <[email protected]> --------- Signed-off-by: AhmedGrati <[email protected]>
- Loading branch information
1 parent
ce1294a
commit 8f0a668
Showing
11 changed files
with
237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '3.8' | ||
volumes: | ||
pgadmin-data: | ||
|
||
services: | ||
pgadmin: | ||
labels: | ||
kompose.security-context.fsgroup: 1001 | ||
image: dpage/pgadmin4 | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: [email protected] | ||
PGADMIN_DEFAULT_PASSWORD: pgadmin_password | ||
volumes: | ||
- pgadmin-data:/var/lib/pgadmin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
kompose.security-context.fsgroup: "1001" | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: pgadmin | ||
name: pgadmin | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
io.kompose.service: pgadmin | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
annotations: | ||
kompose.security-context.fsgroup: "1001" | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.network/fsgroup-default: "true" | ||
io.kompose.service: pgadmin | ||
spec: | ||
containers: | ||
- env: | ||
- name: PGADMIN_DEFAULT_EMAIL | ||
value: [email protected] | ||
- name: PGADMIN_DEFAULT_PASSWORD | ||
value: pgadmin_password | ||
image: dpage/pgadmin4 | ||
name: pgadmin | ||
resources: {} | ||
volumeMounts: | ||
- mountPath: /var/lib/pgadmin | ||
name: pgadmin-data | ||
restartPolicy: Always | ||
securityContext: | ||
fsGroup: 1001 | ||
volumes: | ||
- name: pgadmin-data | ||
persistentVolumeClaim: | ||
claimName: pgadmin-data | ||
status: {} | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: pgadmin-data | ||
name: pgadmin-data | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 100Mi | ||
status: {} | ||
|
||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: NetworkPolicy | ||
metadata: | ||
creationTimestamp: null | ||
name: fsgroup-default | ||
spec: | ||
ingress: | ||
- from: | ||
- podSelector: | ||
matchLabels: | ||
io.kompose.network/fsgroup-default: "true" | ||
podSelector: | ||
matchLabels: | ||
io.kompose.network/fsgroup-default: "true" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: DeploymentConfig | ||
metadata: | ||
annotations: | ||
kompose.security-context.fsgroup: "1001" | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: pgadmin | ||
name: pgadmin | ||
spec: | ||
replicas: 1 | ||
selector: | ||
io.kompose.service: pgadmin | ||
strategy: | ||
resources: {} | ||
type: Recreate | ||
template: | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.network/fsgroup-default: "true" | ||
io.kompose.service: pgadmin | ||
spec: | ||
containers: | ||
- env: | ||
- name: PGADMIN_DEFAULT_EMAIL | ||
value: [email protected] | ||
- name: PGADMIN_DEFAULT_PASSWORD | ||
value: pgadmin_password | ||
image: ' ' | ||
name: pgadmin | ||
resources: {} | ||
volumeMounts: | ||
- mountPath: /var/lib/pgadmin | ||
name: pgadmin-data | ||
restartPolicy: Always | ||
securityContext: | ||
fsGroup: 1001 | ||
volumes: | ||
- name: pgadmin-data | ||
persistentVolumeClaim: | ||
claimName: pgadmin-data | ||
test: false | ||
triggers: | ||
- type: ConfigChange | ||
- imageChangeParams: | ||
automatic: true | ||
containerNames: | ||
- pgadmin | ||
from: | ||
kind: ImageStreamTag | ||
name: pgadmin:latest | ||
type: ImageChange | ||
status: | ||
availableReplicas: 0 | ||
latestVersion: 0 | ||
observedGeneration: 0 | ||
replicas: 0 | ||
unavailableReplicas: 0 | ||
updatedReplicas: 0 | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: ImageStream | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: pgadmin | ||
name: pgadmin | ||
spec: | ||
lookupPolicy: | ||
local: false | ||
tags: | ||
- annotations: null | ||
from: | ||
kind: DockerImage | ||
name: dpage/pgadmin4 | ||
generation: null | ||
importPolicy: {} | ||
name: latest | ||
referencePolicy: | ||
type: "" | ||
status: | ||
dockerImageRepository: "" | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: pgadmin-data | ||
name: pgadmin-data | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 100Mi | ||
status: {} | ||
|