Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [container] add APIs for GKE Control Plane Logs #8728

Merged
merged 2 commits into from
Nov 8, 2022
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
38 changes: 4 additions & 34 deletions java-container/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,58 +11,28 @@ Java idiomatic client for [Kubernetes Engine][product-docs].

## Quickstart

If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:

```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.1.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-container</artifactId>
</dependency>

```

If you are using Maven without BOM, add this to your dependencies:
If you are using Maven, add this to your pom.xml file:


```xml
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-container</artifactId>
<version>2.6.0</version>
<version>2.8.0</version>
</dependency>

```

If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.1.3')

implementation 'com.google.cloud:google-cloud-container'
```
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-container:2.6.0'
implementation 'com.google.cloud:google-cloud-container:2.8.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-container" % "2.6.0"
libraryDependencies += "com.google.cloud" % "google-cloud-container" % "2.8.0"
```

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ public final UnaryCallable<UpdateClusterRequest, Operation> updateClusterCallabl
* .setConfidentialNodes(ConfidentialNodes.newBuilder().build())
* .setGvnic(VirtualNIC.newBuilder().build())
* .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build())
* .setResourceLabels(ResourceLabels.newBuilder().build())
* .build();
* Operation response = clusterManagerClient.updateNodePool(request);
* }
Expand Down Expand Up @@ -851,6 +852,7 @@ public final Operation updateNodePool(UpdateNodePoolRequest request) {
* .setConfidentialNodes(ConfidentialNodes.newBuilder().build())
* .setGvnic(VirtualNIC.newBuilder().build())
* .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build())
* .setResourceLabels(ResourceLabels.newBuilder().build())
* .build();
* ApiFuture<Operation> future =
* clusterManagerClient.updateNodePoolCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ public final UnaryCallable<UpdateClusterRequest, Operation> updateClusterCallabl
* .setConfidentialNodes(ConfidentialNodes.newBuilder().build())
* .setGvnic(VirtualNIC.newBuilder().build())
* .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build())
* .setResourceLabels(ResourceLabels.newBuilder().build())
* .build();
* Operation response = clusterManagerClient.updateNodePool(request);
* }
Expand Down Expand Up @@ -731,6 +732,7 @@ public final Operation updateNodePool(UpdateNodePoolRequest request) {
* .setConfidentialNodes(ConfidentialNodes.newBuilder().build())
* .setGvnic(VirtualNIC.newBuilder().build())
* .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build())
* .setResourceLabels(ResourceLabels.newBuilder().build())
* .build();
* ApiFuture<Operation> future =
* clusterManagerClient.updateNodePoolCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
import com.google.container.v1.OperationProgress;
import com.google.container.v1.PrivateClusterConfig;
import com.google.container.v1.ReleaseChannel;
import com.google.container.v1.ResourceLabels;
import com.google.container.v1.ResourceUsageExportConfig;
import com.google.container.v1.RollbackNodePoolUpgradeRequest;
import com.google.container.v1.ServerConfig;
Expand Down Expand Up @@ -717,6 +718,7 @@ public void updateNodePoolTest() throws Exception {
.setConfidentialNodes(ConfidentialNodes.newBuilder().build())
.setGvnic(VirtualNIC.newBuilder().build())
.setLoggingConfig(NodePoolLoggingConfig.newBuilder().build())
.setResourceLabels(ResourceLabels.newBuilder().build())
.build();

Operation actualResponse = client.updateNodePool(request);
Expand Down Expand Up @@ -747,6 +749,7 @@ public void updateNodePoolTest() throws Exception {
Assert.assertEquals(request.getConfidentialNodes(), actualRequest.getConfidentialNodes());
Assert.assertEquals(request.getGvnic(), actualRequest.getGvnic());
Assert.assertEquals(request.getLoggingConfig(), actualRequest.getLoggingConfig());
Assert.assertEquals(request.getResourceLabels(), actualRequest.getResourceLabels());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand Down Expand Up @@ -781,6 +784,7 @@ public void updateNodePoolExceptionTest() throws Exception {
.setConfidentialNodes(ConfidentialNodes.newBuilder().build())
.setGvnic(VirtualNIC.newBuilder().build())
.setLoggingConfig(NodePoolLoggingConfig.newBuilder().build())
.setResourceLabels(ResourceLabels.newBuilder().build())
.build();
client.updateNodePool(request);
Assert.fail("No exception raised");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
import com.google.container.v1beta1.PrivateClusterConfig;
import com.google.container.v1beta1.ProtectConfig;
import com.google.container.v1beta1.ReleaseChannel;
import com.google.container.v1beta1.ResourceLabels;
import com.google.container.v1beta1.ResourceUsageExportConfig;
import com.google.container.v1beta1.RollbackNodePoolUpgradeRequest;
import com.google.container.v1beta1.ServerConfig;
Expand Down Expand Up @@ -495,6 +496,7 @@ public void updateNodePoolTest() throws Exception {
.setConfidentialNodes(ConfidentialNodes.newBuilder().build())
.setGvnic(VirtualNIC.newBuilder().build())
.setLoggingConfig(NodePoolLoggingConfig.newBuilder().build())
.setResourceLabels(ResourceLabels.newBuilder().build())
.build();

Operation actualResponse = client.updateNodePool(request);
Expand Down Expand Up @@ -525,6 +527,7 @@ public void updateNodePoolTest() throws Exception {
Assert.assertEquals(request.getConfidentialNodes(), actualRequest.getConfidentialNodes());
Assert.assertEquals(request.getGvnic(), actualRequest.getGvnic());
Assert.assertEquals(request.getLoggingConfig(), actualRequest.getLoggingConfig());
Assert.assertEquals(request.getResourceLabels(), actualRequest.getResourceLabels());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand Down Expand Up @@ -559,6 +562,7 @@ public void updateNodePoolExceptionTest() throws Exception {
.setConfidentialNodes(ConfidentialNodes.newBuilder().build())
.setGvnic(VirtualNIC.newBuilder().build())
.setLoggingConfig(NodePoolLoggingConfig.newBuilder().build())
.setResourceLabels(ResourceLabels.newBuilder().build())
.build();
client.updateNodePool(request);
Assert.fail("No exception raised");
Expand Down
3 changes: 2 additions & 1 deletion java-container/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@
<module>proto-google-cloud-container-v1beta1</module>
<module>google-cloud-container-bom</module>
</modules>
</project>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public com.google.container.v1.HorizontalPodAutoscaling getHorizontalPodAutoscal
* </code>
*
* @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See
* google/container/v1/cluster_service.proto;l=1009
* google/container/v1/cluster_service.proto;l=1043
* @return Whether the kubernetesDashboard field is set.
*/
@java.lang.Override
Expand All @@ -212,7 +212,7 @@ public boolean hasKubernetesDashboard() {
* </code>
*
* @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See
* google/container/v1/cluster_service.proto;l=1009
* google/container/v1/cluster_service.proto;l=1043
* @return The kubernetesDashboard.
*/
@java.lang.Override
Expand Down Expand Up @@ -1693,7 +1693,7 @@ public Builder clearHorizontalPodAutoscaling() {
* </code>
*
* @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See
* google/container/v1/cluster_service.proto;l=1009
* google/container/v1/cluster_service.proto;l=1043
* @return Whether the kubernetesDashboard field is set.
*/
@java.lang.Deprecated
Expand All @@ -1715,7 +1715,7 @@ public boolean hasKubernetesDashboard() {
* </code>
*
* @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See
* google/container/v1/cluster_service.proto;l=1009
* google/container/v1/cluster_service.proto;l=1043
* @return The kubernetesDashboard.
*/
@java.lang.Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public interface AddonsConfigOrBuilder
* </code>
*
* @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See
* google/container/v1/cluster_service.proto;l=1009
* google/container/v1/cluster_service.proto;l=1043
* @return Whether the kubernetesDashboard field is set.
*/
@java.lang.Deprecated
Expand All @@ -137,7 +137,7 @@ public interface AddonsConfigOrBuilder
* </code>
*
* @deprecated google.container.v1.AddonsConfig.kubernetes_dashboard is deprecated. See
* google/container/v1/cluster_service.proto;l=1009
* google/container/v1/cluster_service.proto;l=1043
* @return The kubernetesDashboard.
*/
@java.lang.Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public com.google.container.v1.NodeManagementOrBuilder getManagementOrBuilder()
* <code>string min_cpu_platform = 5 [deprecated = true];</code>
*
* @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is
* deprecated. See google/container/v1/cluster_service.proto;l=3347
* deprecated. See google/container/v1/cluster_service.proto;l=3398
* @return The minCpuPlatform.
*/
@java.lang.Override
Expand Down Expand Up @@ -340,7 +340,7 @@ public java.lang.String getMinCpuPlatform() {
* <code>string min_cpu_platform = 5 [deprecated = true];</code>
*
* @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is
* deprecated. See google/container/v1/cluster_service.proto;l=3347
* deprecated. See google/container/v1/cluster_service.proto;l=3398
* @return The bytes for minCpuPlatform.
*/
@java.lang.Override
Expand Down Expand Up @@ -1842,7 +1842,7 @@ public com.google.container.v1.NodeManagementOrBuilder getManagementOrBuilder()
* <code>string min_cpu_platform = 5 [deprecated = true];</code>
*
* @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is
* deprecated. See google/container/v1/cluster_service.proto;l=3347
* deprecated. See google/container/v1/cluster_service.proto;l=3398
* @return The minCpuPlatform.
*/
@java.lang.Deprecated
Expand Down Expand Up @@ -1878,7 +1878,7 @@ public java.lang.String getMinCpuPlatform() {
* <code>string min_cpu_platform = 5 [deprecated = true];</code>
*
* @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is
* deprecated. See google/container/v1/cluster_service.proto;l=3347
* deprecated. See google/container/v1/cluster_service.proto;l=3398
* @return The bytes for minCpuPlatform.
*/
@java.lang.Deprecated
Expand Down Expand Up @@ -1914,7 +1914,7 @@ public com.google.protobuf.ByteString getMinCpuPlatformBytes() {
* <code>string min_cpu_platform = 5 [deprecated = true];</code>
*
* @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is
* deprecated. See google/container/v1/cluster_service.proto;l=3347
* deprecated. See google/container/v1/cluster_service.proto;l=3398
* @param value The minCpuPlatform to set.
* @return This builder for chaining.
*/
Expand Down Expand Up @@ -1949,7 +1949,7 @@ public Builder setMinCpuPlatform(java.lang.String value) {
* <code>string min_cpu_platform = 5 [deprecated = true];</code>
*
* @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is
* deprecated. See google/container/v1/cluster_service.proto;l=3347
* deprecated. See google/container/v1/cluster_service.proto;l=3398
* @return This builder for chaining.
*/
@java.lang.Deprecated
Expand Down Expand Up @@ -1980,7 +1980,7 @@ public Builder clearMinCpuPlatform() {
* <code>string min_cpu_platform = 5 [deprecated = true];</code>
*
* @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is
* deprecated. See google/container/v1/cluster_service.proto;l=3347
* deprecated. See google/container/v1/cluster_service.proto;l=3398
* @param value The bytes for minCpuPlatform to set.
* @return This builder for chaining.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public interface AutoprovisioningNodePoolDefaultsOrBuilder
* <code>string min_cpu_platform = 5 [deprecated = true];</code>
*
* @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is
* deprecated. See google/container/v1/cluster_service.proto;l=3347
* deprecated. See google/container/v1/cluster_service.proto;l=3398
* @return The minCpuPlatform.
*/
@java.lang.Deprecated
Expand All @@ -216,7 +216,7 @@ public interface AutoprovisioningNodePoolDefaultsOrBuilder
* <code>string min_cpu_platform = 5 [deprecated = true];</code>
*
* @deprecated google.container.v1.AutoprovisioningNodePoolDefaults.min_cpu_platform is
* deprecated. See google/container/v1/cluster_service.proto;l=3347
* deprecated. See google/container/v1/cluster_service.proto;l=3398
* @return The bytes for minCpuPlatform.
*/
@java.lang.Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private EvaluationMode(int value) {
* <code>bool enabled = 1 [deprecated = true];</code>
*
* @deprecated google.container.v1.BinaryAuthorization.enabled is deprecated. See
* google/container/v1/cluster_service.proto;l=1237
* google/container/v1/cluster_service.proto;l=1278
* @return The enabled.
*/
@java.lang.Override
Expand Down Expand Up @@ -659,7 +659,7 @@ public Builder mergeFrom(
* <code>bool enabled = 1 [deprecated = true];</code>
*
* @deprecated google.container.v1.BinaryAuthorization.enabled is deprecated. See
* google/container/v1/cluster_service.proto;l=1237
* google/container/v1/cluster_service.proto;l=1278
* @return The enabled.
*/
@java.lang.Override
Expand All @@ -679,7 +679,7 @@ public boolean getEnabled() {
* <code>bool enabled = 1 [deprecated = true];</code>
*
* @deprecated google.container.v1.BinaryAuthorization.enabled is deprecated. See
* google/container/v1/cluster_service.proto;l=1237
* google/container/v1/cluster_service.proto;l=1278
* @param value The enabled to set.
* @return This builder for chaining.
*/
Expand All @@ -702,7 +702,7 @@ public Builder setEnabled(boolean value) {
* <code>bool enabled = 1 [deprecated = true];</code>
*
* @deprecated google.container.v1.BinaryAuthorization.enabled is deprecated. See
* google/container/v1/cluster_service.proto;l=1237
* google/container/v1/cluster_service.proto;l=1278
* @return This builder for chaining.
*/
@java.lang.Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface BinaryAuthorizationOrBuilder
* <code>bool enabled = 1 [deprecated = true];</code>
*
* @deprecated google.container.v1.BinaryAuthorization.enabled is deprecated. See
* google/container/v1/cluster_service.proto;l=1237
* google/container/v1/cluster_service.proto;l=1278
* @return The enabled.
*/
@java.lang.Deprecated
Expand Down
Loading