Skip to content

Commit

Permalink
Adding NE-13594 - support for https (#248)
Browse files Browse the repository at this point in the history
update

Return support for the master type
  • Loading branch information
EarthmanT authored Dec 5, 2023
1 parent 29db88a commit b9457a3
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,4 @@
2.13.27: Use DSL 1.5.
2.13.28: Update dependencies.
2.13.29: Update requirements.
2.13.30: Add back support for master type.
2 changes: 1 addition & 1 deletion cloudify_kubernetes/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '2.13.29'
version = '2.13.30'
26 changes: 20 additions & 6 deletions cloudify_kubernetes/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,11 +718,21 @@ def get_client_config(**kwargs):
:param kwargs: from node properties
:return:
"""
ctx_node = get_node(ctx)
client_config = ctx_node.properties.get(
'client_config', kwargs.get('client_config', {}))
client_config.setdefault('configuration', {})
client_config.setdefault('authentication', {})
client_config['configuration'].setdefault('api_options', {})

# It probably happens in a NI context, but maybe it happens in a
# relationship.
# It is problematic to program for just NI. Leads to problem later on.
node_instance = get_instance(ctx)
master_types = [
'cloudify.nodes.kubernetes.Master',
'cloudify.kubernetes.nodes.Master'
]
for x in node_instance.relationships:
if CLUSTER_REL in x.type_hierarchy and \
CLUSTER_TYPE in x.target.node.type_hierarchy:
Expand All @@ -743,12 +753,16 @@ def get_client_config(**kwargs):
}
}
}
ctx_node = get_node(ctx)
client_config = ctx_node.properties.get(
'client_config', kwargs.get('client_config', {}))
client_config.setdefault('configuration', {})
client_config.setdefault('authentication', {})
client_config['configuration'].setdefault('api_options', {})
elif any(t in x.target.node.type_hierarchy for t in master_types):
configuration = x.target.node.properties.get('configuration')
authentication = x.target.node.properties.get('authentication')
client_config = {
'configuration': configuration,
'authentication': authentication
}
ctx.logger.error(
'Support for these node types has been '
'discontinued: {}'.format(master_types))
az = AKSConnection(client_config['authentication'])
if az.has_service_account and not \
client_config['configuration'].get('file_content'):
Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
kubernetes:
executor: central_deployment_agent
package_name: cloudify-kubernetes-plugin
package_version: '2.13.29'
package_version: '2.13.30'

data_types:

Expand Down
2 changes: 1 addition & 1 deletion plugin_1_4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
kubernetes:
executor: central_deployment_agent
package_name: cloudify-kubernetes-plugin
package_version: '2.13.29'
package_version: '2.13.30'

data_types:

Expand Down
2 changes: 1 addition & 1 deletion plugin_1_5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
kubernetes:
executor: central_deployment_agent
package_name: cloudify-kubernetes-plugin
package_version: '2.13.29'
package_version: '2.13.30'

data_types:

Expand Down
2 changes: 2 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
-e cloudify-utilities-plugins-sdk
cryptography>=41.0.5
charset_normalizer===3.0.1
cffi>=1.14,<1.15
pyyaml>=6.0.1
91 changes: 83 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ aiohttp==3.9.1
# via fusion-common
aiosignal==1.3.1
# via aiohttp
amqp==5.2.0
# via kombu
appdirs==1.4.3
# via fusion-agent
attrs==23.1.0
Expand All @@ -48,6 +50,8 @@ azure-mgmt-core==1.4.0
# via azure-mgmt-containerservice
bcrypt==4.1.1
# via paramiko
billiard==4.2.0
# via celery
boto3==1.33.2
# via cloudify-utilities-plugins-sdk
botocore==1.33.2
Expand All @@ -58,22 +62,37 @@ bottle==0.12.25
# via fusion-common
cachetools==5.3.2
# via google-auth
celery==5.3.6
# via fusion-agent
certifi==2023.11.17
# via
# fusion-mgmtworker
# kubernetes
# msrest
# requests
cffi==1.16.0
cffi==1.14.6
# via
# -r requirements.in
# cryptography
# fusion-agent
# pynacl
# python-gssapi
charset-normalizer===3.0.1
# via
# -r requirements.in
# requests
click==8.1.7
# via fusion-agent
# via
# celery
# click-didyoumean
# click-plugins
# click-repl
# fusion-agent
click-didyoumean==0.3.0
# via celery
click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
cloudify-python-importer==0.2.1
# via cloudify-kubernetes-plugin (setup.py)
cryptography==41.0.7
Expand All @@ -85,10 +104,14 @@ cryptography==41.0.7
# msal
# paramiko
# pyjwt
# pyspnego
# requests-ntlm
deepdiff==5.7.0
# via cloudify-kubernetes-plugin (setup.py)
distro==1.8.0
# via fusion-common
fabric==2.7.1
# via fusion-agent
fasteners==0.19
# via fusion-common
frozenlist==1.4.0
Expand All @@ -109,6 +132,8 @@ idna==3.6
# via
# requests
# yarl
invoke==1.7.3
# via fabric
isodate==0.6.1
# via msrest
jinja2==3.1.2
Expand All @@ -120,6 +145,8 @@ jmespath==1.0.1
# via
# boto3
# botocore
kombu==5.3.4
# via celery
kubernetes==26.1.0
# via cloudify-utilities-plugins-sdk
markupsafe==2.1.3
Expand All @@ -140,7 +167,7 @@ multidict==6.0.4
# via
# aiohttp
# yarl
networkx==2.8.8
networkx==3.2.1
# via fusion-common
oauthlib==3.2.2
# via requests-oauthlib
Expand All @@ -152,13 +179,21 @@ packaging==21.3
# fusion-agent
# fusion-mgmtworker
paramiko==3.3.1
# via cloudify-utilities-plugins-sdk
# via
# cloudify-utilities-plugins-sdk
# fabric
pathlib2==2.3.7.post1
# via fabric
pika==1.3.2
# via fusion-common
pkginfo==1.9.6
# via wagon
ply==3.11
# via pysmi
portalocker==2.8.2
# via msal-extensions
prompt-toolkit==3.0.41
# via click-repl
proxy-tools==0.1.0
# via fusion-common
psutil==5.9.6
Expand All @@ -168,33 +203,55 @@ psycopg2==2.9.9
pyasn1==0.5.1
# via
# pyasn1-modules
# pysnmp
# python-gssapi
# rsa
pyasn1-modules==0.3.0
# via google-auth
pycdlib==1.14.0
# via cloudify-utilities-plugins-sdk
pycparser==2.21
# via cffi
pycryptodomex==3.19.0
# via pysnmp
pyjwt[crypto]==2.8.0
# via
# adal
# msal
pykerberos==1.2.4
# via pywinrm
pynacl==1.5.0
# via paramiko
# via
# fusion-agent
# paramiko
pyparsing==3.1.1
# via packaging
pysmi==0.3.4
# via pysnmp
pysnmp==4.4.12
# via fusion-common
pyspnego==0.10.2
# via requests-ntlm
python-dateutil==2.8.2
# via
# adal
# botocore
# celery
# fusion-mgmtworker
# kubernetes
python-gssapi==0.6.4
# via fusion-agent
pytz==2023.3.post1
# via
# fusion-common
# fusion-mgmtworker
pyyaml==6.0
pywinrm[kerberos]==0.4.3
# via
# fusion-agent
# pywinrm
pyyaml==6.0.1
# via
# -r requirements.in
# cloudify-utilities-plugins-sdk
# fusion-common
# kubernetes
Expand All @@ -208,8 +265,12 @@ requests==2.31.0
# kubernetes
# msal
# msrest
# pywinrm
# requests-ntlm
# requests-oauthlib
# requests-toolbelt
requests-ntlm==1.2.0
# via pywinrm
requests-oauthlib==1.3.1
# via
# kubernetes
Expand All @@ -231,25 +292,39 @@ six==1.16.0
# isodate
# kubernetes
# msrestazure
# pathlib2
# python-dateutil
# python-gssapi
# pywinrm
# retrying
smmap==5.0.1
# via gitdb
typing-extensions==4.8.0
# via azure-core
tzdata==2023.3
# via celery
urllib3==2.0.7
# via
# botocore
# kubernetes
# requests
vine==5.1.0
# via
# amqp
# celery
# kombu
wagon==1.0.1
# via fusion-common
wcwidth==0.2.12
# via prompt-toolkit
websocket-client==1.6.4
# via kubernetes
wheel==0.42.0
# via wagon
xmltodict==0.13.0
# via cloudify-utilities-plugins-sdk
# via
# cloudify-utilities-plugins-sdk
# pywinrm
yarl==1.9.3
# via aiohttp

Expand Down
2 changes: 1 addition & 1 deletion v2_plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins:
kubernetes:
executor: central_deployment_agent
package_name: cloudify-kubernetes-plugin
package_version: '2.13.29'
package_version: '2.13.30'

data_types:

Expand Down

0 comments on commit b9457a3

Please sign in to comment.