Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: container level security context #345

Merged
merged 5 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/v1alpha1/k6_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type Pod struct {
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty"`
SecurityContext corev1.PodSecurityContext `json:"securityContext,omitempty"`
ContainerSecurityContext corev1.SecurityContext `json:"containerSecurityContext,omitempty"`
EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion charts/k6-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.0.12"
description: A Helm chart to install the k6-operator
name: k6-operator
version: 3.3.0
version: 3.4.0
kubeVersion: ">=1.16.0-0"
home: https://k6.io
sources:
Expand Down
4 changes: 2 additions & 2 deletions charts/k6-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# k6-operator

![Version: 3.1.0](https://img.shields.io/badge/Version-3.1.0-informational?style=flat-square) ![AppVersion: 0.0.11](https://img.shields.io/badge/AppVersion-0.0.11-informational?style=flat-square)
![Version: 3.4.0](https://img.shields.io/badge/Version-3.4.0-informational?style=flat-square) ![AppVersion: 0.0.12](https://img.shields.io/badge/AppVersion-0.0.12-informational?style=flat-square)

A Helm chart to install the k6-operator

Expand Down Expand Up @@ -38,7 +38,7 @@ Kubernetes: `>=1.16.0-0`
| manager.env | object | `{}` | Environment variables to be applied on the controller |
| manager.image.name | string | `"ghcr.io/grafana/k6-operator"` | controller-manager image name |
| manager.image.pullPolicy | string | `"Always"` | pull policy for the image possible values Always, Never, IfNotPresent (default: Always) |
| manager.image.tag | string | `"controller-v0.0.11"` | controller-manager image tag |
| manager.image.tag | string | `"controller-v0.0.12"` | controller-manager image tag |
| manager.livenessProbe | object | `{}` | Liveness probe in Probe format |
| manager.readinessProbe | object | `{}` | Readiness probe in Probe format |
| manager.replicas | int | `1` | number of controller-manager replicas (default: 1) |
Expand Down
183 changes: 183 additions & 0 deletions charts/k6-operator/templates/crds/k6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,67 @@ spec:
type: string
type: object
type: object
containerSecurityContext:
properties:
allowPrivilegeEscalation:
type: boolean
capabilities:
properties:
add:
items:
type: string
type: array
drop:
items:
type: string
type: array
type: object
privileged:
type: boolean
procMount:
type: string
readOnlyRootFilesystem:
type: boolean
runAsGroup:
format: int64
type: integer
runAsNonRoot:
type: boolean
runAsUser:
format: int64
type: integer
seLinuxOptions:
properties:
level:
type: string
role:
type: string
type:
type: string
user:
type: string
type: object
seccompProfile:
properties:
localhostProfile:
type: string
type:
type: string
required:
- type
type: object
windowsOptions:
properties:
gmsaCredentialSpec:
type: string
gmsaCredentialSpecName:
type: string
hostProcess:
type: boolean
runAsUserName:
type: string
type: object
type: object
serviceAccountName:
type: string
tolerations:
Expand Down Expand Up @@ -2479,6 +2540,67 @@ spec:
type: string
type: object
type: object
containerSecurityContext:
properties:
allowPrivilegeEscalation:
type: boolean
capabilities:
properties:
add:
items:
type: string
type: array
drop:
items:
type: string
type: array
type: object
privileged:
type: boolean
procMount:
type: string
readOnlyRootFilesystem:
type: boolean
runAsGroup:
format: int64
type: integer
runAsNonRoot:
type: boolean
runAsUser:
format: int64
type: integer
seLinuxOptions:
properties:
level:
type: string
role:
type: string
type:
type: string
user:
type: string
type: object
seccompProfile:
properties:
localhostProfile:
type: string
type:
type: string
required:
- type
type: object
windowsOptions:
properties:
gmsaCredentialSpec:
type: string
gmsaCredentialSpecName:
type: string
hostProcess:
type: boolean
runAsUserName:
type: string
type: object
type: object
serviceAccountName:
type: string
tolerations:
Expand Down Expand Up @@ -4096,6 +4218,67 @@ spec:
type: string
type: object
type: object
containerSecurityContext:
properties:
allowPrivilegeEscalation:
type: boolean
capabilities:
properties:
add:
items:
type: string
type: array
drop:
items:
type: string
type: array
type: object
privileged:
type: boolean
procMount:
type: string
readOnlyRootFilesystem:
type: boolean
runAsGroup:
format: int64
type: integer
runAsNonRoot:
type: boolean
runAsUser:
format: int64
type: integer
seLinuxOptions:
properties:
level:
type: string
role:
type: string
type:
type: string
user:
type: string
type: object
seccompProfile:
properties:
localhostProfile:
type: string
type:
type: string
required:
- type
type: object
windowsOptions:
properties:
gmsaCredentialSpec:
type: string
gmsaCredentialSpecName:
type: string
hostProcess:
type: boolean
runAsUserName:
type: string
type: object
type: object
serviceAccountName:
type: string
tolerations:
Expand Down
Loading
Loading