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
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Release (2026-06-23)
## Release (2026-MM-DD)

- `logme`:
- [v1.0.0](services/logme/CHANGELOG.md#v100)
Expand Down Expand Up @@ -30,7 +30,11 @@
- **Breaking Change:** The region is no longer specified within the client configuration. Instead, the region must be passed as a parameter to any region-specific request.
- **Deprecation:** `tls_ciphers`, `tls_ciphersuites`, `tls_protocols` from `InstanceParameters` model are deprecated and will be removed 2026-12-10.
- **Feature:** Added optional `CreateCredentialsPayload`.

- `ske`:
- [v1.12.0](services/ske/CHANGELOG.md#v1120)
- **Improvement:** Add regex validation of `name` attribute in model class `Cluster`
- **Feature:** New model class `Audit`
- **Feature:** Add optional attribute `audit` (type `Audit`) to model class `Cluster`

## Release (2026-13-05)
- `auditlog`:
Expand Down
5 changes: 5 additions & 0 deletions services/ske/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v1.12.0
- **Improvement:** Add regex validation of `name` attribute in model class `Cluster`
- **Feature:** New model class `Audit`
- **Feature:** Add optional attribute `audit` (type `Audit`) to model class `Cluster`

## v1.11.0
- **Feature:** Add attribute `service_account_issuer` to model `ClusterStatus`

Expand Down
2 changes: 1 addition & 1 deletion services/ske/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d2755fb2bda0e2105f920af64d7176d184b2bcb7
ea0931a6f93703c990517136e0d4c7a88455b282
2 changes: 1 addition & 1 deletion services/ske/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "stackit-ske"
version = "v1.11.0"
version = "v1.12.0"
description = "SKE-API"
authors = [{ name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud" }]
requires-python = ">=3.9,<4.0"
Expand Down
2 changes: 2 additions & 0 deletions services/ske/src/stackit/ske/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"ACL",
"Access",
"AccessScope",
"Audit",
"AvailabilityZone",
"CRI",
"Cluster",
Expand Down Expand Up @@ -93,6 +94,7 @@

# import models into sdk package
from stackit.ske.models.acl import ACL as ACL
from stackit.ske.models.audit import Audit as Audit
from stackit.ske.models.availability_zone import AvailabilityZone as AvailabilityZone
from stackit.ske.models.cluster import Cluster as Cluster
from stackit.ske.models.cluster_error import ClusterError as ClusterError
Expand Down
27 changes: 21 additions & 6 deletions services/ske/src/stackit/ske/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,12 @@ def create_or_update_cluster(
self,
project_id: StrictStr,
region: StrictStr,
cluster_name: StrictStr,
cluster_name: Annotated[
StrictStr,
Field(
description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long."
),
],
create_or_update_cluster_payload: CreateOrUpdateClusterPayload,
_request_timeout: Union[
None,
Expand All @@ -629,7 +634,7 @@ def create_or_update_cluster(
:type project_id: str
:param region: (required)
:type region: str
:param cluster_name: (required)
:param cluster_name: Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. (required)
:type cluster_name: str
:param create_or_update_cluster_payload: (required)
:type create_or_update_cluster_payload: CreateOrUpdateClusterPayload
Expand Down Expand Up @@ -684,7 +689,12 @@ def create_or_update_cluster_with_http_info(
self,
project_id: StrictStr,
region: StrictStr,
cluster_name: StrictStr,
cluster_name: Annotated[
StrictStr,
Field(
description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long."
),
],
create_or_update_cluster_payload: CreateOrUpdateClusterPayload,
_request_timeout: Union[
None,
Expand All @@ -704,7 +714,7 @@ def create_or_update_cluster_with_http_info(
:type project_id: str
:param region: (required)
:type region: str
:param cluster_name: (required)
:param cluster_name: Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. (required)
:type cluster_name: str
:param create_or_update_cluster_payload: (required)
:type create_or_update_cluster_payload: CreateOrUpdateClusterPayload
Expand Down Expand Up @@ -759,7 +769,12 @@ def create_or_update_cluster_without_preload_content(
self,
project_id: StrictStr,
region: StrictStr,
cluster_name: StrictStr,
cluster_name: Annotated[
StrictStr,
Field(
description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long."
),
],
create_or_update_cluster_payload: CreateOrUpdateClusterPayload,
_request_timeout: Union[
None,
Expand All @@ -779,7 +794,7 @@ def create_or_update_cluster_without_preload_content(
:type project_id: str
:param region: (required)
:type region: str
:param cluster_name: (required)
:param cluster_name: Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. (required)
:type cluster_name: str
:param create_or_update_cluster_payload: (required)
:type create_or_update_cluster_payload: CreateOrUpdateClusterPayload
Expand Down
1 change: 1 addition & 0 deletions services/ske/src/stackit/ske/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

# import models into model package
from stackit.ske.models.acl import ACL
from stackit.ske.models.audit import Audit
from stackit.ske.models.availability_zone import AvailabilityZone
from stackit.ske.models.cluster import Cluster
from stackit.ske.models.cluster_error import ClusterError
Expand Down
84 changes: 84 additions & 0 deletions services/ske/src/stackit/ske/models/audit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# coding: utf-8

"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks.

The version of the OpenAPI document: 2.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations

import json
import pprint
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictBool
from pydantic_core import to_jsonable_python
from typing_extensions import Self


class Audit(BaseModel):
"""
Audit
""" # noqa: E501

enabled: StrictBool = Field(
description="Enable cluster audit log forwarding to a Telemetry Router. ⚠️ Note: This feature is in private preview. Enabling audit logging is only possible for enabled accounts. Otherwise the request will be rejected."
)
__properties: ClassVar[List[str]] = ["enabled"]

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
validate_assignment=True,
protected_namespaces=(),
)

def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
return json.dumps(to_jsonable_python(self.to_dict()))

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Audit from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Audit from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({"enabled": obj.get("enabled")})
return _obj
28 changes: 26 additions & 2 deletions services/ske/src/stackit/ske/models/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@

import json
import pprint
import re # noqa: F401
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, field_validator
from pydantic_core import to_jsonable_python
from typing_extensions import Annotated, Self

from stackit.ske.models.access import Access
from stackit.ske.models.audit import Audit
from stackit.ske.models.cluster_status import ClusterStatus
from stackit.ske.models.extension import Extension
from stackit.ske.models.hibernation import Hibernation
Expand All @@ -37,16 +39,21 @@ class Cluster(BaseModel):
""" # noqa: E501

access: Optional[Access] = None
audit: Optional[Audit] = None
extensions: Optional[Extension] = None
hibernation: Optional[Hibernation] = None
kubernetes: Kubernetes
maintenance: Optional[Maintenance] = None
name: Optional[StrictStr] = None
name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=11)]] = Field(
default=None,
description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long.",
)
network: Optional[Network] = None
nodepools: Annotated[List[Nodepool], Field(min_length=1, max_length=50)]
status: Optional[ClusterStatus] = None
__properties: ClassVar[List[str]] = [
"access",
"audit",
"extensions",
"hibernation",
"kubernetes",
Expand All @@ -57,6 +64,19 @@ class Cluster(BaseModel):
"status",
]

@field_validator("name")
def name_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if value is None:
return value

if not isinstance(value, str):
value = str(value)

if not re.match(r"^[a-z0-9]([a-z0-9-]{0,9}[a-z0-9])?$", value):
raise ValueError(r"must validate the regular expression /^[a-z0-9]([a-z0-9-]{0,9}[a-z0-9])?$/")
return value

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
Expand Down Expand Up @@ -102,6 +122,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of access
if self.access:
_dict["access"] = self.access.to_dict()
# override the default output from pydantic by calling `to_dict()` of audit
if self.audit:
_dict["audit"] = self.audit.to_dict()
# override the default output from pydantic by calling `to_dict()` of extensions
if self.extensions:
_dict["extensions"] = self.extensions.to_dict()
Expand Down Expand Up @@ -141,6 +164,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"access": Access.from_dict(obj["access"]) if obj.get("access") is not None else None,
"audit": Audit.from_dict(obj["audit"]) if obj.get("audit") is not None else None,
"extensions": Extension.from_dict(obj["extensions"]) if obj.get("extensions") is not None else None,
"hibernation": (
Hibernation.from_dict(obj["hibernation"]) if obj.get("hibernation") is not None else None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from typing_extensions import Annotated, Self

from stackit.ske.models.access import Access
from stackit.ske.models.audit import Audit
from stackit.ske.models.cluster_status import ClusterStatus
from stackit.ske.models.extension import Extension
from stackit.ske.models.hibernation import Hibernation
Expand All @@ -37,6 +38,7 @@ class CreateOrUpdateClusterPayload(BaseModel):
""" # noqa: E501

access: Optional[Access] = None
audit: Optional[Audit] = None
extensions: Optional[Extension] = None
hibernation: Optional[Hibernation] = None
kubernetes: Kubernetes
Expand All @@ -46,6 +48,7 @@ class CreateOrUpdateClusterPayload(BaseModel):
status: Optional[ClusterStatus] = None
__properties: ClassVar[List[str]] = [
"access",
"audit",
"extensions",
"hibernation",
"kubernetes",
Expand Down Expand Up @@ -95,6 +98,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of access
if self.access:
_dict["access"] = self.access.to_dict()
# override the default output from pydantic by calling `to_dict()` of audit
if self.audit:
_dict["audit"] = self.audit.to_dict()
# override the default output from pydantic by calling `to_dict()` of extensions
if self.extensions:
_dict["extensions"] = self.extensions.to_dict()
Expand Down Expand Up @@ -134,6 +140,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"access": Access.from_dict(obj["access"]) if obj.get("access") is not None else None,
"audit": Audit.from_dict(obj["audit"]) if obj.get("audit") is not None else None,
"extensions": Extension.from_dict(obj["extensions"]) if obj.get("extensions") is not None else None,
"hibernation": (
Hibernation.from_dict(obj["hibernation"]) if obj.get("hibernation") is not None else None
Expand Down
Loading