k8s-helper-cli 0.4.0__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {k8s_helper_cli-0.4.0/src/k8s_helper_cli.egg-info → k8s_helper_cli-0.4.2}/PKG-INFO +1 -1
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/pyproject.toml +1 -1
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper/__init__.py +1 -1
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper/core.py +39 -9
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2/src/k8s_helper_cli.egg-info}/PKG-INFO +1 -1
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/LICENSE +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/README.md +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/setup.cfg +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper/cli.py +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper/config.py +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper/utils.py +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper_cli.egg-info/SOURCES.txt +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper_cli.egg-info/dependency_links.txt +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper_cli.egg-info/entry_points.txt +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper_cli.egg-info/requires.txt +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper_cli.egg-info/top_level.txt +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/tests/test_core.py +0 -0
- {k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/tests/test_integration.py +0 -0
@@ -1937,14 +1937,26 @@ scrape_configs:
|
|
1937
1937
|
api_groups=["extensions"],
|
1938
1938
|
resources=["ingresses"],
|
1939
1939
|
verbs=["get", "list", "watch"]
|
1940
|
-
),
|
1941
|
-
client.V1PolicyRule(
|
1942
|
-
non_resource_urls=["/metrics"],
|
1943
|
-
verbs=["get"]
|
1944
1940
|
)
|
1945
1941
|
]
|
1946
1942
|
)
|
1947
1943
|
|
1944
|
+
# Add non-resource URL rule with version compatibility
|
1945
|
+
try:
|
1946
|
+
# Try the newer parameter name first
|
1947
|
+
non_resource_rule = client.V1PolicyRule(
|
1948
|
+
non_resource_ur_ls=["/metrics"],
|
1949
|
+
verbs=["get"]
|
1950
|
+
)
|
1951
|
+
except TypeError:
|
1952
|
+
# Fall back to older parameter name
|
1953
|
+
non_resource_rule = client.V1PolicyRule(
|
1954
|
+
non_resource_urls=["/metrics"],
|
1955
|
+
verbs=["get"]
|
1956
|
+
)
|
1957
|
+
|
1958
|
+
cluster_role.rules.append(non_resource_rule)
|
1959
|
+
|
1948
1960
|
try:
|
1949
1961
|
rbac_v1.create_cluster_role(body=cluster_role)
|
1950
1962
|
except ApiException as e:
|
@@ -1952,15 +1964,33 @@ scrape_configs:
|
|
1952
1964
|
raise e
|
1953
1965
|
|
1954
1966
|
# ClusterRoleBinding
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1967
|
+
# Create subject with version compatibility
|
1968
|
+
try:
|
1969
|
+
# Try V1Subject first (older versions)
|
1970
|
+
subject = client.V1Subject(
|
1971
|
+
kind="ServiceAccount",
|
1972
|
+
name="prometheus",
|
1973
|
+
namespace=namespace
|
1974
|
+
)
|
1975
|
+
except AttributeError:
|
1976
|
+
# Try RbacV1Subject (newer versions)
|
1977
|
+
try:
|
1978
|
+
subject = client.RbacV1Subject(
|
1959
1979
|
kind="ServiceAccount",
|
1960
1980
|
name="prometheus",
|
1961
1981
|
namespace=namespace
|
1962
1982
|
)
|
1963
|
-
|
1983
|
+
except AttributeError:
|
1984
|
+
# Manual construction as fallback
|
1985
|
+
subject = {
|
1986
|
+
'kind': 'ServiceAccount',
|
1987
|
+
'name': 'prometheus',
|
1988
|
+
'namespace': namespace
|
1989
|
+
}
|
1990
|
+
|
1991
|
+
cluster_role_binding = client.V1ClusterRoleBinding(
|
1992
|
+
metadata=client.V1ObjectMeta(name="prometheus"),
|
1993
|
+
subjects=[subject],
|
1964
1994
|
role_ref=client.V1RoleRef(
|
1965
1995
|
kind="ClusterRole",
|
1966
1996
|
name="prometheus",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{k8s_helper_cli-0.4.0 → k8s_helper_cli-0.4.2}/src/k8s_helper_cli.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|