|
21 | 21 | import yaml
|
22 | 22 |
|
23 | 23 | import config_helper
|
| 24 | +import log_util as log |
24 | 25 | import property_generator
|
25 | 26 | import schema_values_common
|
26 | 27 | import storage
|
@@ -108,15 +109,22 @@ def process(schema, values, deployer_image, deployer_entrypoint, version_repo,
|
108 | 109 | # Merge input and provisioned properties.
|
109 | 110 | app_params = dict(list(values.iteritems()) + list(props.iteritems()))
|
110 | 111 |
|
| 112 | + use_kalm = False |
111 | 113 | if (schema.is_v2() and
|
112 | 114 | schema.x_google_marketplace.managed_updates.kalm_supported):
|
| 115 | + if version_repo: |
| 116 | + use_kalm = True |
| 117 | + else: |
| 118 | + log.warn('The deployer supports KALM but no --version-repo specified. ' |
| 119 | + 'Falling back to provisioning the deployer job only.') |
| 120 | + |
| 121 | + if use_kalm: |
113 | 122 | manifests += provision_kalm(
|
114 | 123 | schema,
|
115 | 124 | version_repo=version_repo,
|
116 | 125 | app_name=app_name,
|
117 | 126 | namespace=namespace,
|
118 | 127 | deployer_image=deployer_image,
|
119 |
| - deployer_entrypoint=deployer_entrypoint, |
120 | 128 | image_pull_secret=image_pull_secret,
|
121 | 129 | app_params=app_params)
|
122 | 130 | else:
|
@@ -156,7 +164,7 @@ def provision_from_storage(key, value, app_name, namespace):
|
156 | 164 |
|
157 | 165 |
|
158 | 166 | def provision_kalm(schema, version_repo, app_name, namespace, deployer_image,
|
159 |
| - deployer_entrypoint, app_params, image_pull_secret): |
| 167 | + app_params, image_pull_secret): |
160 | 168 | """Provisions KALM resource for installing the application."""
|
161 | 169 | if not version_repo:
|
162 | 170 | raise Exception('A valid --version_repo must be specified')
|
|
0 commit comments