Skip to content

Commit 5986165

Browse files
committed
Update model to v0.18.0 and Kubernetes 1.33.3
1 parent d6abdf7 commit 5986165

File tree

6 files changed

+130
-10
lines changed

6 files changed

+130
-10
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let package = Package(
1919
.package(url: "https://github.com/apple/swift-metrics.git", .upToNextMajor(from: "2.5.1")),
2020
.package(url: "https://github.com/apple/swift-nio", .upToNextMajor(from: "2.80.0")),
2121
.package(url: "https://github.com/jpsim/Yams.git", .upToNextMajor(from: "5.1.3")),
22-
.package(url: "https://github.com/swiftkube/model.git", .upToNextMinor(from: "0.17.0")),
22+
.package(url: "https://github.com/swiftkube/model.git", .upToNextMinor(from: "0.18.0")),
2323
.package(url: "https://github.com/swift-server/async-http-client.git", .upToNextMajor(from: "1.24.2")),
2424
],
2525
targets: [

Sources/SwiftkubeClient/API Groups/KubernetesClient+authentication.v1beta1.swift renamed to Sources/SwiftkubeClient/API Groups/KubernetesClient+certificates.v1beta1.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,29 @@
1717
import Foundation
1818
import SwiftkubeModel
1919

20-
// MARK: - AuthenticationV1Beta1API
20+
// MARK: - CertificatesV1Beta1API
2121

22-
public protocol AuthenticationV1Beta1API: Sendable {
22+
public protocol CertificatesV1Beta1API: Sendable {
2323

24-
var selfSubjectReviews: ClusterScopedGenericKubernetesClient<authentication.v1beta1.SelfSubjectReview> { get }
24+
var clusterTrustBundles: ClusterScopedGenericKubernetesClient<certificates.v1beta1.ClusterTrustBundle> { get }
2525
}
2626

27-
/// DSL for `authentication.k8s.io.v1beta1` API Group
27+
/// DSL for `certificates.k8s.io.v1beta1` API Group
2828
public extension KubernetesClient {
2929

30-
final class AuthenticationV1Beta1: AuthenticationV1Beta1API {
30+
final class CertificatesV1Beta1: CertificatesV1Beta1API {
3131
private let client: KubernetesClient
3232

3333
internal init(_ client: KubernetesClient) {
3434
self.client = client
3535
}
3636

37-
public var selfSubjectReviews: ClusterScopedGenericKubernetesClient<authentication.v1beta1.SelfSubjectReview> {
38-
client.clusterScoped(for: authentication.v1beta1.SelfSubjectReview.self)
37+
public var clusterTrustBundles: ClusterScopedGenericKubernetesClient<certificates.v1beta1.ClusterTrustBundle> {
38+
client.clusterScoped(for: certificates.v1beta1.ClusterTrustBundle.self)
3939
}
4040
}
4141

42-
var authenticationV1Beta1: AuthenticationV1Beta1API {
43-
AuthenticationV1Beta1(self)
42+
var certificatesV1Beta1: CertificatesV1Beta1API {
43+
CertificatesV1Beta1(self)
4444
}
4545
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//
2+
// Copyright 2020 Swiftkube Project
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
import Foundation
18+
import SwiftkubeModel
19+
20+
// MARK: - CoordinationV1Beta1API
21+
22+
public protocol CoordinationV1Beta1API: Sendable {
23+
24+
var leaseCandidates: NamespacedGenericKubernetesClient<coordination.v1beta1.LeaseCandidate> { get }
25+
}
26+
27+
/// DSL for `coordination.k8s.io.v1beta1` API Group
28+
public extension KubernetesClient {
29+
30+
final class CoordinationV1Beta1: CoordinationV1Beta1API {
31+
private let client: KubernetesClient
32+
33+
internal init(_ client: KubernetesClient) {
34+
self.client = client
35+
}
36+
37+
public var leaseCandidates: NamespacedGenericKubernetesClient<coordination.v1beta1.LeaseCandidate> {
38+
client.namespaceScoped(for: coordination.v1beta1.LeaseCandidate.self)
39+
}
40+
}
41+
42+
var coordinationV1Beta1: CoordinationV1Beta1API {
43+
CoordinationV1Beta1(self)
44+
}
45+
}

Sources/SwiftkubeClient/API Groups/KubernetesClient+networking.v1.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ import SwiftkubeModel
2121

2222
public protocol NetworkingV1API: Sendable {
2323

24+
var iPAddresses: ClusterScopedGenericKubernetesClient<networking.v1.IPAddress> { get }
2425
var ingresses: NamespacedGenericKubernetesClient<networking.v1.Ingress> { get }
2526
var ingressClasses: ClusterScopedGenericKubernetesClient<networking.v1.IngressClass> { get }
2627
var networkPolicies: NamespacedGenericKubernetesClient<networking.v1.NetworkPolicy> { get }
28+
var serviceCIDRs: ClusterScopedGenericKubernetesClient<networking.v1.ServiceCIDR> { get }
2729
}
2830

2931
/// DSL for `networking.k8s.io.v1` API Group
@@ -36,6 +38,10 @@ public extension KubernetesClient {
3638
self.client = client
3739
}
3840

41+
public var iPAddresses: ClusterScopedGenericKubernetesClient<networking.v1.IPAddress> {
42+
client.clusterScoped(for: networking.v1.IPAddress.self)
43+
}
44+
3945
public var ingresses: NamespacedGenericKubernetesClient<networking.v1.Ingress> {
4046
client.namespaceScoped(for: networking.v1.Ingress.self)
4147
}
@@ -47,6 +53,10 @@ public extension KubernetesClient {
4753
public var networkPolicies: NamespacedGenericKubernetesClient<networking.v1.NetworkPolicy> {
4854
client.namespaceScoped(for: networking.v1.NetworkPolicy.self)
4955
}
56+
57+
public var serviceCIDRs: ClusterScopedGenericKubernetesClient<networking.v1.ServiceCIDR> {
58+
client.clusterScoped(for: networking.v1.ServiceCIDR.self)
59+
}
5060
}
5161

5262
var networkingV1: NetworkingV1API {

Sources/SwiftkubeClient/API Groups/KubernetesClient+resource.v1alpha3.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import SwiftkubeModel
2222
public protocol ResourceV1Alpha3API: Sendable {
2323

2424
var deviceClasses: ClusterScopedGenericKubernetesClient<resource.v1alpha3.DeviceClass> { get }
25+
var deviceTaintRules: ClusterScopedGenericKubernetesClient<resource.v1alpha3.DeviceTaintRule> { get }
2526
var resourceClaims: NamespacedGenericKubernetesClient<resource.v1alpha3.ResourceClaim> { get }
2627
var resourceClaimTemplates: NamespacedGenericKubernetesClient<resource.v1alpha3.ResourceClaimTemplate> { get }
2728
var resourceSlices: ClusterScopedGenericKubernetesClient<resource.v1alpha3.ResourceSlice> { get }
@@ -41,6 +42,10 @@ public extension KubernetesClient {
4142
client.clusterScoped(for: resource.v1alpha3.DeviceClass.self)
4243
}
4344

45+
public var deviceTaintRules: ClusterScopedGenericKubernetesClient<resource.v1alpha3.DeviceTaintRule> {
46+
client.clusterScoped(for: resource.v1alpha3.DeviceTaintRule.self)
47+
}
48+
4449
public var resourceClaims: NamespacedGenericKubernetesClient<resource.v1alpha3.ResourceClaim> {
4550
client.namespaceScoped(for: resource.v1alpha3.ResourceClaim.self)
4651
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
//
2+
// Copyright 2020 Swiftkube Project
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
import Foundation
18+
import SwiftkubeModel
19+
20+
// MARK: - ResourceV1Beta2API
21+
22+
public protocol ResourceV1Beta2API: Sendable {
23+
24+
var deviceClasses: ClusterScopedGenericKubernetesClient<resource.v1beta2.DeviceClass> { get }
25+
var resourceClaims: NamespacedGenericKubernetesClient<resource.v1beta2.ResourceClaim> { get }
26+
var resourceClaimTemplates: NamespacedGenericKubernetesClient<resource.v1beta2.ResourceClaimTemplate> { get }
27+
var resourceSlices: ClusterScopedGenericKubernetesClient<resource.v1beta2.ResourceSlice> { get }
28+
}
29+
30+
/// DSL for `resource.k8s.io.v1beta2` API Group
31+
public extension KubernetesClient {
32+
33+
final class ResourceV1Beta2: ResourceV1Beta2API {
34+
private let client: KubernetesClient
35+
36+
internal init(_ client: KubernetesClient) {
37+
self.client = client
38+
}
39+
40+
public var deviceClasses: ClusterScopedGenericKubernetesClient<resource.v1beta2.DeviceClass> {
41+
client.clusterScoped(for: resource.v1beta2.DeviceClass.self)
42+
}
43+
44+
public var resourceClaims: NamespacedGenericKubernetesClient<resource.v1beta2.ResourceClaim> {
45+
client.namespaceScoped(for: resource.v1beta2.ResourceClaim.self)
46+
}
47+
48+
public var resourceClaimTemplates: NamespacedGenericKubernetesClient<resource.v1beta2.ResourceClaimTemplate> {
49+
client.namespaceScoped(for: resource.v1beta2.ResourceClaimTemplate.self)
50+
}
51+
52+
public var resourceSlices: ClusterScopedGenericKubernetesClient<resource.v1beta2.ResourceSlice> {
53+
client.clusterScoped(for: resource.v1beta2.ResourceSlice.self)
54+
}
55+
}
56+
57+
var resourceV1Beta2: ResourceV1Beta2API {
58+
ResourceV1Beta2(self)
59+
}
60+
}

0 commit comments

Comments
 (0)