Add SCC security contexts and resource limits for optimizer and UI#92
Draft
shekhar316 wants to merge 1 commit into
Draft
Add SCC security contexts and resource limits for optimizer and UI#92shekhar316 wants to merge 1 commit into
shekhar316 wants to merge 1 commit into
Conversation
- Added pod and container security contexts for OpenShift SCC compatibility - Added security context to init containers (AllowPrivilegeEscalation=false, drop ALL capabilities) - Added security context to main containers (AllowPrivilegeEscalation=false, drop ALL capabilities, RunAsNonRoot=true) - Added resource requests and limits for optimizer deployment (CPU: 200m-500m, Memory: 256Mi-512Mi) - Added resource requests and limits for UI deployment (CPU: 100m-200m, Memory: 128Mi-256Mi) - Applied changes to both OpenShift and Kubernetes deployments
Reviewer's GuideAdds pod/container security contexts for SCC/PSA compatibility and defines CPU/memory requests & limits for optimizer and UI deployments in both OpenShift and vanilla Kubernetes generators. Updated class diagram for KruizeResourceGenerator deployment specsclassDiagram
class KruizeResourceGenerator {
+string Autotune_image
+string Autotune_ui_image
+appsv1_Deployment kruizeDeployment()
+appsv1_Deployment kruizeDeploymentKubernetes()
+appsv1_Deployment kruizeOptimizerDeployment()
+appsv1_Deployment kruizeUINginxDeployment()
}
class appsv1_Deployment {
+ObjectMeta metadata
+DeploymentSpec spec
}
class DeploymentSpec {
+PodTemplateSpec template
}
class PodTemplateSpec {
+PodSpec spec
}
class PodSpec {
+string ServiceAccountName
+PodSecurityContext SecurityContext
+Container[] InitContainers
+Container[] Containers
}
class PodSecurityContext {
+bool RunAsNonRoot
+SeccompProfile SeccompProfile
}
class SeccompProfile {
+string Type
}
class Container {
+string Name
+string Image
+string ImagePullPolicy
+SecurityContext SecurityContext
+VolumeMount[] VolumeMounts
+ContainerPort[] Ports
+ResourceRequirements Resources
+EnvVar[] Env
}
class SecurityContext {
+bool AllowPrivilegeEscalation
+Capabilities Capabilities
+bool RunAsNonRoot
}
class Capabilities {
+Capability[] Drop
}
class ResourceRequirements {
+ResourceList Requests
+ResourceList Limits
}
KruizeResourceGenerator --> appsv1_Deployment : creates
appsv1_Deployment --> DeploymentSpec
DeploymentSpec --> PodTemplateSpec
PodTemplateSpec --> PodSpec
PodSpec --> PodSecurityContext
PodSpec --> Container : InitContainers
PodSpec --> Container : Containers
PodSecurityContext --> SeccompProfile
Container --> SecurityContext
SecurityContext --> Capabilities
Container --> ResourceRequirements
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documenting changes done for catalogathon
Summary by Sourcery
Harden Kruize deployments and define resource constraints for optimizer and UI workloads across OpenShift and Kubernetes manifests.
Enhancements: