Skip to content

Commit

Permalink
[controller] Adapt Python hooks for Deckhouse pod's switch to Alt Lin…
Browse files Browse the repository at this point in the history
…ux (#14)

## Description
<!---
  Describe your changes in detail.

Please let users know if your feature influences critical cluster
components
  (restarts of ingress-controllers, control-plane, Prometheus, etc).
-->

This PR fixes the hooks-related issues caused by Python module updates.

## Why do we need it, and what problem does it solve?
<!---
  This is the most important paragraph.
  You must describe the main goal of your feature.

  If it fixes an issue, place a link to the issue here.

If it fixes an obvious bug, please tell users about the impact and
effect of the problem.
-->

Hooks broken because of module update

## What is the expected result?
<!---
  How can one check these changes after applying?  

Describe, what (resource, state, event, etc.) MUST or MUST NOT
change/happen after applying these changes.
-->

Properly working hooks

## Checklist
- [ ] The code is covered by unit tests.
- [ ] e2e tests passed.
- [ ] Documentation updated according to the changes.
- [ ] Changes were tested in the Kubernetes cluster manually.

Signed-off-by: v.oleynikov <[email protected]>
Co-authored-by: Yaroslav Borbat <[email protected]>
  • Loading branch information
duckhawk and yaroslavborbat authored Feb 16, 2024
1 parent a7b7d5b commit 55f5b6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions hooks/lib/certificate/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def with_metadata(self, country: str = None,
def add_extension(self, type_name: str,
critical: bool,
value: str,
subject: crypto.Optional["X509"] = None,
issuer: crypto.Optional["X509"] = None):
subject: crypto.X509 = None,
issuer: crypto.X509 = None):
"""
Adds extensions to certificate.
:param type_name: The name of the type of extension_ to create.
Expand All @@ -96,10 +96,10 @@ def add_extension(self, type_name: str,
:type value: :py:class:`str`
:param subject: Optional X509 certificate to use as subject.
:type subject: :py:class:`crypto.Optional["X509"]`
:type subject: :py:class:`crypto.X509`
:param issuer: Optional X509 certificate to use as issuer.
:type issuer: :py:class:`crypto.Optional["X509"]`
:type issuer: :py:class:`crypto.X509`
"""
ext = crypto.X509Extension(type_name=str.encode(type_name),
critical=critical,
Expand Down
7 changes: 3 additions & 4 deletions lib/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
cffi==1.16.0
cryptography==41.0.4
cryptography==42.0.2
DateTime==5.2
deckhouse==0.4.9
dictdiffer==0.9.0
dotmap==1.3.30
pycparser==2.21
pyOpenSSL==23.2.0
pyOpenSSL==24.0.0
pytz==2023.3.post1
PyYAML==6.0.1
zope.interface==6.0
Expand All @@ -14,6 +14,5 @@ jsonpointer==2.4
attrs==23.1.0
jsonschema==4.19.1
jsonschema-specifications==2023.7.1
kubernetes==28.1.0
kubernetes-validate==1.28.0
rpds-py==0.10.6

0 comments on commit 55f5b6c

Please sign in to comment.