Documentation ¶
Index ¶
- Variables
- func CompareEnv(a, b []corev1.EnvVar) bool
- func CompareInt64(a, b *int64) bool
- func CompareMap(a, b map[string]string) bool
- func ComparePullSecrets(a, b []corev1.LocalObjectReference) bool
- func CompareSecret(oldSecret, newSecret *corev1.Secret) bool
- func CompareSlice(a, b []string) bool
- func CreateIstioSidecarSecurityContext(istioSidecarUid int64) *corev1.SecurityContext
- func GetSecretData(secret *corev1.Secret) map[string]string
- func GetSubmarineCommon(submarine *submarineapacheorgv1.Submarine) *submarineapacheorgv1.SubmarineCommon
- func GetSubmarineCommonImage(submarine *submarineapacheorgv1.Submarine) *submarineapacheorgv1.CommonImage
- func ParseDeploymentYaml(relativePath string) (*appsv1.Deployment, error)
- func ParsePersistentVolumeClaimYaml(relativePath string) (*v1.PersistentVolumeClaim, error)
- func ParseRoleBindingYaml(relativePath string) (*rbacv1.RoleBinding, error)
- func ParseRoleYaml(relativePath string) (*rbacv1.Role, error)
- func ParseSecretYaml(relativePath string) (*v1.Secret, error)
- func ParseServiceAccountYaml(relativePath string) (*v1.ServiceAccount, error)
- func ParseServiceYaml(relativePath string) (*v1.Service, error)
- func ParseStatefulSetYaml(relativePath string) (*appsv1.StatefulSet, error)
- func ParseVirtualService(relativePath string) (*istiov1alpha3.VirtualService, error)
Constants ¶
This section is empty.
Variables ¶
var ArtifactBasePath = os.Getenv(artifactBasePathEnv)
ArtifactBasePath is default submarine path, We can use it instead of the yaml path to solve the relative path problem when testing
Functions ¶
func CompareEnv ¶
CompareEnv will determine if two EnvVars are equal
func CompareInt64 ¶
CompareInt64 will determine if two int64 are equal
func CompareMap ¶
CompareMap will determine if two maps are equal
func ComparePullSecrets ¶
func ComparePullSecrets(a, b []corev1.LocalObjectReference) bool
ComparePullSecrets will determine if two LocalObjectReferences are equal
func CompareSecret ¶
CompareSecret will determine if two Secrets are equal
func CompareSlice ¶
CompareSlice will determine if two slices are equal
func CreateIstioSidecarSecurityContext ¶
func CreateIstioSidecarSecurityContext(istioSidecarUid int64) *corev1.SecurityContext
CreateIstioSidecarSecurityContext will support runAsUser for sidecar proxy with istio, especially using istio CNI https://istio.io/latest/docs/setup/additional-setup/cni/#compatibility-with-application-init-containers
func GetSecretData ¶
GetSecretData will return secret data ( map[string]string )
func GetSubmarineCommon ¶
func GetSubmarineCommon(submarine *submarineapacheorgv1.Submarine) *submarineapacheorgv1.SubmarineCommon
GetSubmarineCommon will get `spec.common` and initialize it if it is nil to prevent NPE
func GetSubmarineCommonImage ¶
func GetSubmarineCommonImage(submarine *submarineapacheorgv1.Submarine) *submarineapacheorgv1.CommonImage
GetSubmarineCommonImage will get `spec.common.image` and initialize it if it is nil to prevent NPE
func ParseDeploymentYaml ¶
func ParseDeploymentYaml(relativePath string) (*appsv1.Deployment, error)
ParseDeploymentYaml parse Deployment from yaml file.
func ParsePersistentVolumeClaimYaml ¶
func ParsePersistentVolumeClaimYaml(relativePath string) (*v1.PersistentVolumeClaim, error)
ParsePersistentVolumeClaimYaml parse PersistentVolumeClaimYaml from yaml file.
func ParseRoleBindingYaml ¶
func ParseRoleBindingYaml(relativePath string) (*rbacv1.RoleBinding, error)
ParseRoleBindingYaml parse RoleBinding from yaml file.
func ParseRoleYaml ¶
ParseRoleYaml parse Role from yaml file.
func ParseSecretYaml ¶
ParseSecretYaml parse Secret from yaml file.
func ParseServiceAccountYaml ¶
func ParseServiceAccountYaml(relativePath string) (*v1.ServiceAccount, error)
ParseServiceAccountYaml parse ServiceAccount from yaml file.
func ParseServiceYaml ¶
ParseServiceYaml parse Service from yaml file.
func ParseStatefulSetYaml ¶
func ParseStatefulSetYaml(relativePath string) (*appsv1.StatefulSet, error)
ParseStatefulSetYaml parse StatefulSets from yaml file.
func ParseVirtualService ¶
func ParseVirtualService(relativePath string) (*istiov1alpha3.VirtualService, error)
ParseVirtualService parse VirtualService from yaml file.
Types ¶
This section is empty.