airflow-gcp-k8s icon indicating copy to clipboard operation
airflow-gcp-k8s copied to clipboard

Syntax error

Open max-sixty opened this issue 7 years ago • 1 comments

In the first command, unfortunately

python2 gcp-airflow.py
  File "gcp-airflow.py", line 116
    ,)
    ^
SyntaxError: invalid syntax

max-sixty avatar May 02 '17 23:05 max-sixty

Deleting the two commas does at least let the script execute, no idea if its ok though https://github.com/iihnordic/airflow-gcp-k8s/blob/master/gcp-airflow.py

I guess if like other functions it needs apply_changes

def deploy_airflow(name, image_suffix):
    def apply_changes(service):
        service['metadata']['labels']['version'] = version
        service['spec']['template']['metadata']['labels']['version'] = version
        service['spec']['template']['spec']['containers'][0][
            'image'] = repo + '/airflow-' + image_suffix + ':' + version

    execute_with_yaml('k8s/airflow-' + name + '-deploy.yaml',
                      ['kubectl', 'create', '--namespace', namespace, '-f', '-'],
                      apply_changes)

MarkEdmondson1234 avatar Jul 12 '17 08:07 MarkEdmondson1234