Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ WORKDIR /app
RUN apt-get update && apt-get install -y make build-essential && apt-get clean
RUN pip install pipenv

ENV PIPENV_VENV_IN_PROJECT=1 \
ENV HOME=/app \
PIPENV_VENV_IN_PROJECT=1 \
VIRTUALENV_SEEDER=pip

COPY Pipfile Pipfile.lock ./
Expand All @@ -32,7 +33,8 @@ RUN apt-get update && apt-get install -y git libnss-wrapper && apt-get clean

RUN pip install pipenv

ENV PIPENV_VENV_IN_PROJECT=1
ENV HOME=/app \
PIPENV_VENV_IN_PROJECT=1

COPY --from=builder /app/.venv/ ./.venv/
COPY --from=helm_binding_builder \
Expand Down
3 changes: 2 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ autopep8 = "*"

[packages]
click = "*"
cookiecutter = "*"
# Until we get sane kapitan dependencies
cookiecutter = "==1.7.0"
GitPython = "*"
kapitan = "*"
requests = "*"
Expand Down
274 changes: 174 additions & 100 deletions Pipfile.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions commodore/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def _full_target(cluster, components, catalog):
(P('inventory/classes/defaults') / f"{cn}.yml").is_file()]
global_defaults = ['global.common', f"global.{cluster_distro}", f"global.{cloud_provider}"]
if not cluster_distro:
raise click.ClickException(f"Required fact 'distribution' not set")
raise click.ClickException("Required fact 'distribution' not set")
if not cloud_provider:
raise click.ClickException(f"Required fact 'cloud' not set")
raise click.ClickException("Required fact 'cloud' not set")
if cloud_region:
global_defaults.append(f"global.{cloud_provider}.{cloud_region}")
global_defaults.append(f"{customer}.{cluster_id}")
Expand Down
8 changes: 4 additions & 4 deletions commodore/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

def _fetch_global_config(cfg, cluster):
config = cluster['base_config']
click.secho(f"Updating global config...", bold=True)
click.secho('Updating global config...', bold=True)
repo = git.clone_repository(
f"{cfg.global_git_base}/{config}.git",
'inventory/classes/global')
Expand Down Expand Up @@ -93,10 +93,10 @@ def _local_setup(config, cluster_id):
raise click.ClickException(f"Invalid target: {target_name}")
click.echo(f" > Using target: {target_name}")

click.echo(f" > Reconstructing Cluster API data from target")
click.echo(' > Reconstructing Cluster API data from target')
cluster = reconstruct_api_response(target_yml)
if cluster['id'] != cluster_id:
error = f"[Local mode] Cluster ID mismatch: local state targets " + \
error = '[Local mode] Cluster ID mismatch: local state targets ' + \
f"{cluster['id']}, compilation was requested for {cluster_id}"
raise click.ClickException(error)

Expand Down Expand Up @@ -154,7 +154,7 @@ def compile(config, cluster_id):

p = kapitan_compile()
if p.returncode != 0:
raise click.ClickException(f"Kapitan catalog compilation failed.")
raise click.ClickException('Kapitan catalog compilation failed.')

postprocess_components(kapitan_inventory, target_name, config.get_components())

Expand Down
2 changes: 1 addition & 1 deletion commodore/component_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def create_component(config, name, lib, pp):
index.add('*')
git.commit(repo, 'Initial commit')

click.echo(f" > Installing component")
click.echo(' > Installing component')
create_component_symlinks(name)

targetfile = P('inventory', 'targets', 'cluster.yml')
Expand Down
2 changes: 1 addition & 1 deletion commodore/postprocess/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def postprocess_components(inventory, target, components):
for f in filters['filters']:
# old-style filters are always 'jsonnet'
if 'type' not in f:
click.secho(f" > [WARN] component uses old-style postprocess filters",
click.secho(' > [WARN] component uses old-style postprocess filters',
fg='yellow')
f['type'] = 'jsonnet'
if f['type'] == 'jsonnet':
Expand Down
2 changes: 1 addition & 1 deletion commodore/refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _find_ref(self, key, value):
click.echo(f" > Found secret ref {r.refstr} in {value}")
if r.refstr in self._refs:
if self.debug:
click.echo(f" > Duplicate ref, adding key to list")
click.echo(' > Duplicate ref, adding key to list')
self._refs[r.refstr].add_key(key)
else:
self._refs[r.refstr] = r
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
click
cookiecutter
cookiecutter==1.7.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this version pinned? Is the reason for this documented somewhere?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See commit message for "Bulk update dependencies"

GitPython
kapitan
requests
Expand Down
57 changes: 28 additions & 29 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,59 @@
# pip-compile --output-file=requirements.txt requirements.in
#
addict==2.2.1 # via kapitan
arrow==0.15.5 # via jinja2-time
arrow==0.15.6 # via jinja2-time
attrs==19.3.0 # via jsonschema
binaryornot==0.4.4 # via cookiecutter
boto3==1.11.17 # via kapitan
botocore==1.14.17 # via boto3, s3transfer
cachetools==4.0.0 # via google-auth
certifi==2019.11.28 # via requests
boto3==1.13.5 # via kapitan
botocore==1.16.5 # via boto3, s3transfer
cachetools==4.1.0 # via google-auth
certifi==2020.4.5.1 # via requests
cffi==1.14.0 # via cryptography, kapitan
chardet==3.0.4 # via binaryornot, requests
click==7.0
cookiecutter==1.7.0
cryptography==2.8 # via kapitan
docker==4.1.0 # via kapitan
click==7.1.2 # via -r requirements.in, cookiecutter
cookiecutter==1.7.0 # via -r requirements.in
cryptography==2.9.2 # via kapitan
docker==4.2.0 # via kapitan
docutils==0.15.2 # via botocore
future==0.18.2 # via cookiecutter
gitdb2==2.0.6 # via gitpython
gitpython==3.0.5
gitdb2==4.0.2 # via gitpython
gitdb==4.0.5 # via gitdb2
gitpython==3.0.8 # via -r requirements.in, kapitan
google-api-python-client==1.7.11 # via kapitan
google-auth-httplib2==0.0.3 # via google-api-python-client
google-auth==1.11.2 # via google-api-python-client, google-auth-httplib2
httplib2==0.17.0 # via google-api-python-client, google-auth-httplib2
google-auth==1.14.2 # via google-api-python-client, google-auth-httplib2
httplib2==0.17.3 # via google-api-python-client, google-auth-httplib2
hvac==0.9.6 # via kapitan
idna==2.8 # via requests
importlib-metadata==1.5.0 # via jsonschema
jinja2-time==0.2.0 # via cookiecutter
jinja2==2.11.1 # via cookiecutter, jinja2-time, kapitan
jmespath==0.9.4 # via boto3, botocore
jsonnet==0.14.0 # via kapitan
jinja2==2.11.2 # via cookiecutter, jinja2-time, kapitan
jmespath==0.9.5 # via boto3, botocore
jsonnet==0.15.0 # via kapitan
jsonschema==3.2.0 # via kapitan
kapitan==0.26.1
kapitan==0.27.2 # via -r requirements.in
markupsafe==1.1.1 # via jinja2
pathspec==0.7.0 # via yamllint
pathspec==0.8.0 # via yamllint
poyo==0.5.0 # via cookiecutter
pyasn1-modules==0.2.8 # via google-auth
pyasn1==0.4.8 # via pyasn1-modules, rsa
pycparser==2.19 # via cffi
pyparsing==2.4.6 # via kapitan
pyrsistent==0.15.7 # via jsonschema
pycparser==2.20 # via cffi
pyparsing==2.4.7 # via kapitan
pyrsistent==0.16.0 # via jsonschema
python-dateutil==2.8.1 # via arrow, botocore
python-gnupg==0.4.5 # via kapitan
pyyaml==5.3 # via kapitan, yamllint
requests==2.22.0
pyyaml==5.3.1 # via kapitan, yamllint
requests==2.22.0 # via -r requirements.in, cookiecutter, docker, hvac, kapitan
rfc3987==1.3.8 # via kapitan
rsa==4.0 # via google-auth
s3transfer==0.3.3 # via boto3
six==1.14.0 # via cryptography, docker, google-api-python-client, google-auth, hvac, jsonschema, kapitan, pyrsistent, python-dateutil, url-normalize, websocket-client
smmap2==2.0.5 # via gitdb2
smmap==3.0.4 # via gitdb
uritemplate==3.0.1 # via google-api-python-client
url-normalize==1.4.1
urllib3==1.25.8 # via botocore, requests
url-normalize==1.4.2 # via -r requirements.in
urllib3==1.25.9 # via botocore, requests
websocket-client==0.57.0 # via docker
whichcraft==0.6.1 # via cookiecutter
yamllint==1.20.0 # via kapitan
zipp==2.2.0 # via importlib-metadata
yamllint==1.23.0 # via kapitan

# The following packages are considered to be unsafe in a requirements file:
# setuptools