Skip to content

Commit

Permalink
Merge branch 'dev' into refactor/vault-client-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoVoges committed Oct 4, 2023
2 parents 9e12800 + 5a39483 commit 39b80cf
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 24 deletions.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
blank_issues_enabled: false
contact_links:
- name: '💬 Open a Discussion'
url: https://github.com/kapicorp/kapitan/discussions/new/choose
about: |
Share your thoughts, ideas, or concerns, and engage in discussions with the community to collaborate and improve the project.
- name: '💬 Join us on Slack'
url: https://kubernetes.slack.com/archives/C981W2HD3
about: |
Join our Slack channel to connect with our community, ask questions, and stay updated on project developments.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Documentation Issue
description: Give us feedback on the documentation
title: "[docs]: "
labels: ["documentation"]
body:
# information
- type: markdown
attributes:
value: |
Thanks for taking the time to give us feedback!
# feature description
- type: textarea
id: documentation-issue-description
attributes:
label: Description of the documentation issue
description: |
A clear and concise description of what the issue with documentation is.
Please make proposals, how it could be done better.
placeholder: Tell us what you want to see in the project!
validations:
required: true
# additional context
- type: textarea
id: additional-context
attributes:
label: Additional context
description: |
Add any other context about the feature here.
placeholder: Anything that might help us understanding your documentation issue...
3 changes: 3 additions & 0 deletions .github/workflows/test-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ jobs:
type=semver,pattern={{major}}
- uses: int128/docker-manifest-create-action@v1
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME}}
if: env.DOCKERHUB_USERNAME != null
with:
tags: ${{ steps.meta.outputs.tags }}
builder: buildx
Expand Down
19 changes: 7 additions & 12 deletions kapitan/inventory/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ def escape_interpolation(content: str):

def merge(*args):
"""resolver function, that merges omegaconf objects"""
merge = OmegaConf.merge(*args, list_merge_mode=ListMergeMode.EXTEND)
return merge
return OmegaConf.merge(*args, list_merge_mode=ListMergeMode.EXTEND)


def to_dict(input):
Expand Down Expand Up @@ -79,7 +78,7 @@ def default(*args):
return output


def relpath(path: str, _node_):
def relpath(path: str, _node_: Node):
"""
resolver function, that translates an absolute yaml-path to its relative path
"""
Expand Down Expand Up @@ -127,20 +126,16 @@ def write_to_key(destination: str, origin: str, _root_):
# resolve relative interpolations
try:
# TODO: replace with OC.to_object(), when it supports escaped interpolations
copied = copy.deepcopy(content)
OmegaConf.resolve(copied, True)
config = copy.deepcopy(content)
OmegaConf.resolve(config, True)
except Exception as e:
# resolver error
logger.warning(e)

# write resolved content back to _root_
# OmegaConf.set_readonly(copied.server, False)
# print(copied)
# print(copied.server._get_flag("readonly"))
# TODO: replace current workaround with clean flag overriding
obj = OmegaConf.to_container(copied)
config = OmegaConf.create(obj)
# TODO: remove when todo above is resolved
OmegaConf.set_readonly(config, False, recursive=True)

# write resolved content back to _root_
OmegaConf.update(_root_, destination, config, merge=True, force_add=True)
except Exception as e:
raise e
Expand Down
22 changes: 11 additions & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jinja2 = "^3.0.1"
jsonnet = "^0.20.0"
jsonschema = "^4.17.3"
kadet = "^0.2.2"
python-gnupg = "^0.4.7"
python-gnupg = ">=0.4.7,<0.6.0"
pyyaml = "^6.0"
omegaconf = { git = "https://github.com/neXenio/omegaconf.git", branch = "dev" }
requests = "^2.28.2"
Expand Down

0 comments on commit 39b80cf

Please sign in to comment.