Skip to content

Commit 80c885d

Browse files
committed
Update to Kubernetes v1.28.0
1 parent 88d3550 commit 80c885d

8 files changed

+137
-32
lines changed

.swiftformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@
6262
--wrapreturntype preserve
6363
--xcodeindentation disabled
6464
--yodaswap always
65-
--disable anyObjectProtocol,blankLinesAtStartOfScope,emptyBraces,initCoderUnavailable,modifierOrder,redundanttype,spaceAroundBrackets,spaceAroundGenerics,spaceAroundParens,strongOutlets,strongifiedSelf,typeSugar,wrapAttributes,yodaConditions
65+
--disable anyObjectProtocol,blankLinesAtStartOfScope,emptyBraces,initCoderUnavailable,modifierOrder,redundantInternal,redundanttype,spaceAroundBrackets,spaceAroundGenerics,spaceAroundParens,strongOutlets,strongifiedSelf,typeSugar,wrapAttributes,yodaConditions
6666
--enable markTypes

Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ let package = Package(
1515
),
1616
],
1717
dependencies: [
18-
.package(url: "https://github.com/swiftkube/model.git", .upToNextMinor(from: "0.11.0")),
18+
.package(url: "https://github.com/swiftkube/model.git", .upToNextMinor(from: "0.12.0")),
1919
.package(url: "https://github.com/swift-server/async-http-client.git", .upToNextMajor(from: "1.18.0")),
20-
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.5.2")),
21-
.package(url: "https://github.com/apple/swift-metrics.git", .upToNextMajor(from: "2.4.0")),
22-
.package(url: "https://github.com/jpsim/Yams.git", .upToNextMajor(from: "5.0.5")),
20+
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.5.3")),
21+
.package(url: "https://github.com/apple/swift-metrics.git", .upToNextMajor(from: "2.4.1")),
22+
.package(url: "https://github.com/jpsim/Yams.git", .upToNextMajor(from: "5.0.6")),
2323
.package(url: "https://github.com/apple/swift-nio", .upToNextMajor(from: "2.54.0")),
2424
],
2525
targets: [
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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: - AdmissionRegistrationV1Beta1API
21+
22+
public protocol AdmissionRegistrationV1Beta1API {
23+
24+
var validatingAdmissionPolicies: ClusterScopedGenericKubernetesClient<admissionregistration.v1beta1.ValidatingAdmissionPolicy> { get }
25+
var validatingAdmissionPolicyBindings: ClusterScopedGenericKubernetesClient<admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding> { get }
26+
}
27+
28+
/// DSL for `admissionregistration.k8s.io.v1beta1` API Group
29+
public extension KubernetesClient {
30+
31+
class AdmissionRegistrationV1Beta1: AdmissionRegistrationV1Beta1API {
32+
private var client: KubernetesClient
33+
34+
internal init(_ client: KubernetesClient) {
35+
self.client = client
36+
}
37+
38+
public var validatingAdmissionPolicies: ClusterScopedGenericKubernetesClient<admissionregistration.v1beta1.ValidatingAdmissionPolicy> {
39+
client.clusterScoped(for: admissionregistration.v1beta1.ValidatingAdmissionPolicy.self)
40+
}
41+
42+
public var validatingAdmissionPolicyBindings: ClusterScopedGenericKubernetesClient<admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding> {
43+
client.clusterScoped(for: admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding.self)
44+
}
45+
}
46+
47+
var admissionRegistrationV1Beta1: AdmissionRegistrationV1Beta1API {
48+
AdmissionRegistrationV1Beta1(self)
49+
}
50+
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import SwiftkubeModel
2121

2222
public protocol AuthenticationV1API {
2323

24+
var selfSubjectReviews: ClusterScopedGenericKubernetesClient<authentication.v1.SelfSubjectReview> { get }
2425
var tokenRequests: NamespacedGenericKubernetesClient<authentication.v1.TokenRequest> { get }
2526
var tokenReviews: ClusterScopedGenericKubernetesClient<authentication.v1.TokenReview> { get }
2627
}
@@ -35,6 +36,10 @@ public extension KubernetesClient {
3536
self.client = client
3637
}
3738

39+
public var selfSubjectReviews: ClusterScopedGenericKubernetesClient<authentication.v1.SelfSubjectReview> {
40+
client.clusterScoped(for: authentication.v1.SelfSubjectReview.self)
41+
}
42+
3843
public var tokenRequests: NamespacedGenericKubernetesClient<authentication.v1.TokenRequest> {
3944
client.namespaceScoped(for: authentication.v1.TokenRequest.self)
4045
}
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: - AuthenticationV1Beta1API
21+
22+
public protocol AuthenticationV1Beta1API {
23+
24+
var selfSubjectReviews: ClusterScopedGenericKubernetesClient<authentication.v1beta1.SelfSubjectReview> { get }
25+
}
26+
27+
/// DSL for `authentication.k8s.io.v1beta1` API Group
28+
public extension KubernetesClient {
29+
30+
class AuthenticationV1Beta1: AuthenticationV1Beta1API {
31+
private var client: KubernetesClient
32+
33+
internal init(_ client: KubernetesClient) {
34+
self.client = client
35+
}
36+
37+
public var selfSubjectReviews: ClusterScopedGenericKubernetesClient<authentication.v1beta1.SelfSubjectReview> {
38+
client.clusterScoped(for: authentication.v1beta1.SelfSubjectReview.self)
39+
}
40+
}
41+
42+
var authenticationV1Beta1: AuthenticationV1Beta1API {
43+
AuthenticationV1Beta1(self)
44+
}
45+
}

Sources/SwiftkubeClient/API Groups/KubernetesClient+storage.v1beta1.swift renamed to Sources/SwiftkubeClient/API Groups/KubernetesClient+certificates.v1alpha1.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: - StorageV1Beta1API
20+
// MARK: - CertificatesV1Alpha1API
2121

22-
public protocol StorageV1Beta1API {
22+
public protocol CertificatesV1Alpha1API {
2323

24-
var csiStorageCapacities: NamespacedGenericKubernetesClient<storage.v1beta1.CSIStorageCapacity> { get }
24+
var clusterTrusubundles: ClusterScopedGenericKubernetesClient<certificates.v1alpha1.ClusterTrustBundle> { get }
2525
}
2626

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

30-
class StorageV1Beta1: StorageV1Beta1API {
30+
class CertificatesV1Alpha1: CertificatesV1Alpha1API {
3131
private var client: KubernetesClient
3232

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

37-
public var csiStorageCapacities: NamespacedGenericKubernetesClient<storage.v1beta1.CSIStorageCapacity> {
38-
client.namespaceScoped(for: storage.v1beta1.CSIStorageCapacity.self)
37+
public var clusterTrusubundles: ClusterScopedGenericKubernetesClient<certificates.v1alpha1.ClusterTrustBundle> {
38+
client.clusterScoped(for: certificates.v1alpha1.ClusterTrustBundle.self)
3939
}
4040
}
4141

42-
var storageV1Beta1: StorageV1Beta1API {
43-
StorageV1Beta1(self)
42+
var certificatesV1Alpha1: CertificatesV1Alpha1API {
43+
CertificatesV1Alpha1(self)
4444
}
4545
}

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

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

2424
var clusterCIDRs: ClusterScopedGenericKubernetesClient<networking.v1alpha1.ClusterCIDR> { get }
25+
var iPAddresses: ClusterScopedGenericKubernetesClient<networking.v1alpha1.IPAddress> { get }
2526
}
2627

2728
/// DSL for `networking.k8s.io.v1alpha1` API Group
@@ -37,6 +38,10 @@ public extension KubernetesClient {
3738
public var clusterCIDRs: ClusterScopedGenericKubernetesClient<networking.v1alpha1.ClusterCIDR> {
3839
client.clusterScoped(for: networking.v1alpha1.ClusterCIDR.self)
3940
}
41+
42+
public var iPAddresses: ClusterScopedGenericKubernetesClient<networking.v1alpha1.IPAddress> {
43+
client.clusterScoped(for: networking.v1alpha1.IPAddress.self)
44+
}
4045
}
4146

4247
var networkingV1Alpha1: NetworkingV1Alpha1API {

Sources/SwiftkubeClient/API Groups/KubernetesClient+resource.v1alpha1.swift renamed to Sources/SwiftkubeClient/API Groups/KubernetesClient+resource.v1alpha2.swift

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

20-
// MARK: - ResourceV1Alpha1API
20+
// MARK: - ResourceV1Alpha2API
2121

22-
public protocol ResourceV1Alpha1API {
22+
public protocol ResourceV1Alpha2API {
2323

24-
var podSchedulings: NamespacedGenericKubernetesClient<resource.v1alpha1.PodScheduling> { get }
25-
var resourceClaims: NamespacedGenericKubernetesClient<resource.v1alpha1.ResourceClaim> { get }
26-
var resourceClaimTemplates: NamespacedGenericKubernetesClient<resource.v1alpha1.ResourceClaimTemplate> { get }
27-
var resourceClasses: ClusterScopedGenericKubernetesClient<resource.v1alpha1.ResourceClass> { get }
24+
var podSchedulingContexts: NamespacedGenericKubernetesClient<resource.v1alpha2.PodSchedulingContext> { get }
25+
var resourceClaims: NamespacedGenericKubernetesClient<resource.v1alpha2.ResourceClaim> { get }
26+
var resourceClaimTemplates: NamespacedGenericKubernetesClient<resource.v1alpha2.ResourceClaimTemplate> { get }
27+
var resourceClasses: ClusterScopedGenericKubernetesClient<resource.v1alpha2.ResourceClass> { get }
2828
}
2929

30-
/// DSL for `resource.k8s.io.v1alpha1` API Group
30+
/// DSL for `resource.k8s.io.v1alpha2` API Group
3131
public extension KubernetesClient {
3232

33-
class ResourceV1Alpha1: ResourceV1Alpha1API {
33+
class ResourceV1Alpha2: ResourceV1Alpha2API {
3434
private var client: KubernetesClient
3535

3636
internal init(_ client: KubernetesClient) {
3737
self.client = client
3838
}
3939

40-
public var podSchedulings: NamespacedGenericKubernetesClient<resource.v1alpha1.PodScheduling> {
41-
client.namespaceScoped(for: resource.v1alpha1.PodScheduling.self)
40+
public var podSchedulingContexts: NamespacedGenericKubernetesClient<resource.v1alpha2.PodSchedulingContext> {
41+
client.namespaceScoped(for: resource.v1alpha2.PodSchedulingContext.self)
4242
}
4343

44-
public var resourceClaims: NamespacedGenericKubernetesClient<resource.v1alpha1.ResourceClaim> {
45-
client.namespaceScoped(for: resource.v1alpha1.ResourceClaim.self)
44+
public var resourceClaims: NamespacedGenericKubernetesClient<resource.v1alpha2.ResourceClaim> {
45+
client.namespaceScoped(for: resource.v1alpha2.ResourceClaim.self)
4646
}
4747

48-
public var resourceClaimTemplates: NamespacedGenericKubernetesClient<resource.v1alpha1.ResourceClaimTemplate> {
49-
client.namespaceScoped(for: resource.v1alpha1.ResourceClaimTemplate.self)
48+
public var resourceClaimTemplates: NamespacedGenericKubernetesClient<resource.v1alpha2.ResourceClaimTemplate> {
49+
client.namespaceScoped(for: resource.v1alpha2.ResourceClaimTemplate.self)
5050
}
5151

52-
public var resourceClasses: ClusterScopedGenericKubernetesClient<resource.v1alpha1.ResourceClass> {
53-
client.clusterScoped(for: resource.v1alpha1.ResourceClass.self)
52+
public var resourceClasses: ClusterScopedGenericKubernetesClient<resource.v1alpha2.ResourceClass> {
53+
client.clusterScoped(for: resource.v1alpha2.ResourceClass.self)
5454
}
5555
}
5656

57-
var resourceV1Alpha1: ResourceV1Alpha1API {
58-
ResourceV1Alpha1(self)
57+
var resourceV1Alpha2: ResourceV1Alpha2API {
58+
ResourceV1Alpha2(self)
5959
}
6060
}

0 commit comments

Comments
 (0)