Documentation ¶
Overview ¶
Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func CreateDefaultResourcesPatch(selectedRule *types.Rule, containerOrder int, ...) []types.PatchOperation
- func CreateEnvPatch(containerOrder int, containerInfo types.ContainerInfo, ...) []types.PatchOperation
- func CreateRunAsNonRootPatch(selectedRule *types.Rule, order int, containerInfo types.ContainerInfo, ...) []types.PatchOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDefaultResourcesPatch ¶
func CreateDefaultResourcesPatch(selectedRule *types.Rule, containerOrder int, containerInfo types.ContainerInfo, containerResources corev1.ResourceRequirements) []types.PatchOperation
add default resources to container if not exists.
func CreateEnvPatch ¶
func CreateEnvPatch(containerOrder int, containerInfo types.ContainerInfo, containerEnv []corev1.EnvVar, newEnv []corev1.EnvVar) []types.PatchOperation
add env to container.
func CreateRunAsNonRootPatch ¶
func CreateRunAsNonRootPatch(selectedRule *types.Rule, order int, containerInfo types.ContainerInfo, podSecurityContext *corev1.PodSecurityContext, containerSecurityContext *corev1.SecurityContext) []types.PatchOperation
add RunAsNonRoot policy to all containers (exlude InitContainers).
Types ¶
This section is empty.