| 189 | } |
| 190 | |
| 191 | func (e *AlluxioEngine) parseRuntimeImage(image string, tag string, imagePullPolicy string, imagePullSecrets []v1.LocalObjectReference) (string, string, string, []v1.LocalObjectReference) { |
| 192 | if len(imagePullPolicy) == 0 { |
| 193 | imagePullPolicy = common.DefaultImagePullPolicy |
| 194 | } |
| 195 | |
| 196 | if len(image) == 0 { |
| 197 | image = docker.GetImageRepoFromEnv(common.AlluxioRuntimeImageEnv) |
| 198 | if len(image) == 0 { |
| 199 | runtimeImageInfo := strings.Split(common.DefaultAlluxioRuntimeImage, ":") |
| 200 | if len(runtimeImageInfo) < 1 { |
| 201 | panic("invalid default alluxio runtime image!") |
| 202 | } else { |
| 203 | image = runtimeImageInfo[0] |
| 204 | } |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | if len(tag) == 0 { |
| 209 | tag = docker.GetImageTagFromEnv(common.AlluxioRuntimeImageEnv) |
| 210 | if len(tag) == 0 { |
| 211 | runtimeImageInfo := strings.Split(common.DefaultAlluxioRuntimeImage, ":") |
| 212 | if len(runtimeImageInfo) < 2 { |
| 213 | panic("invalid default alluxio runtime image!") |
| 214 | } else { |
| 215 | tag = runtimeImageInfo[1] |
| 216 | } |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | if len(imagePullSecrets) == 0 { |
| 221 | // if the environment variable is not set, it is still an empty slice |
| 222 | imagePullSecrets = docker.GetImagePullSecretsFromEnv(common.EnvImagePullSecretsKey) |
| 223 | } |
| 224 | |
| 225 | return image, tag, imagePullPolicy, imagePullSecrets |
| 226 | } |
| 227 | |
| 228 | func (e *AlluxioEngine) parseFuseImage(image string, tag string, imagePullPolicy string, imagePullSecrets []v1.LocalObjectReference) (string, string, string, []v1.LocalObjectReference) { |
| 229 | if len(imagePullPolicy) == 0 { |