Skip to content

Commit bd0ee36

Browse files
authored
Merge branch 'kubernetes-client:master' into master
2 parents 218bb31 + a99fbe4 commit bd0ee36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+658
-487
lines changed

.github/workflows/buildtest.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
os: [ubuntu-latest, windows-latest, macOS-latest]
99
name: Dotnet build
1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212
with:
1313
fetch-depth: 0
1414
- name: Setup dotnet
15-
uses: actions/setup-dotnet@v4
15+
uses: actions/setup-dotnet@v5
1616
with:
1717
dotnet-version: |
1818
8.0.x
@@ -42,13 +42,13 @@ jobs:
4242
runs-on: windows-latest
4343
name: MSBuild build
4444
steps:
45-
- uses: actions/checkout@v4
45+
- uses: actions/checkout@v5
4646
with:
4747
fetch-depth: 0
4848
- name: Add msbuild to PATH
4949
uses: microsoft/setup-msbuild@v2
5050
- name: Setup dotnet SDK
51-
uses: actions/setup-dotnet@v4
51+
uses: actions/setup-dotnet@v5
5252
with:
5353
dotnet-version: '9.0.x'
5454
- name: Restore nugets (msbuild)
@@ -59,11 +59,11 @@ jobs:
5959
e2e:
6060
runs-on: ubuntu-latest
6161
steps:
62-
- uses: actions/checkout@v4
62+
- uses: actions/checkout@v5
6363
with:
6464
fetch-depth: 0
6565
- name: Setup dotnet
66-
uses: actions/setup-dotnet@v4
66+
uses: actions/setup-dotnet@v5
6767
with:
6868
dotnet-version: |
6969
8.0.x

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
jobs:
1818
analyze:
1919
name: Analyze
20-
runs-on: windows-2019
20+
runs-on: windows-2022
2121

2222
strategy:
2323
fail-fast: false
@@ -26,12 +26,12 @@ jobs:
2626

2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v5
3030
with:
3131
fetch-depth: 0
3232

3333
- name: Setup dotnet
34-
uses: actions/setup-dotnet@v4
34+
uses: actions/setup-dotnet@v5
3535
with:
3636
dotnet-version: |
3737
8.0.x

.github/workflows/docfx.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
name: github-pages
2626
url: ${{ steps.deployment.outputs.page_url }}
2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v5
2929
with:
3030
fetch-depth: 0
3131

3232
- name: Setup dotnet
33-
uses: actions/setup-dotnet@v4
33+
uses: actions/setup-dotnet@v5
3434
with:
3535
dotnet-version: |
3636
8.0.x
@@ -39,15 +39,15 @@ jobs:
3939
- name: Build
4040
run: dotnet build -c Release
4141

42-
- uses: nunit/docfx-action@v4.0.0
42+
- uses: nunit/docfx-action@v4.1.0
4343
name: Build Documentation
4444
with:
4545
args: doc/docfx.json
4646

4747
- name: Setup Pages
4848
uses: actions/configure-pages@v5
4949
- name: Upload artifact
50-
uses: actions/upload-pages-artifact@v3
50+
uses: actions/upload-pages-artifact@v4
5151
with:
5252
# Upload entire repository
5353
path: doc/_site

.github/workflows/draft.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
runs-on: windows-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
with:
1818
fetch-depth: 0
1919

2020
- name: Setup dotnet
21-
uses: actions/setup-dotnet@v4
21+
uses: actions/setup-dotnet@v5
2222
with:
2323
dotnet-version: |
2424
8.0.x

.github/workflows/nuget.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
runs-on: windows-latest
1111

1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414
with:
1515
fetch-depth: 0
1616

1717
- name: Setup dotnet
18-
uses: actions/setup-dotnet@v4
18+
uses: actions/setup-dotnet@v5
1919
with:
2020
dotnet-version: |
2121
8.0.x

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2727
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2828
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
29-
<LangVersion>11.0</LangVersion>
29+
<LangVersion>13.0</LangVersion>
3030
</PropertyGroup>
3131

3232
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">

SECURITY_CONTACTS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
# INSTRUCTIONS AT https://kubernetes.io/security/
1212

1313
brendandburns
14+
tg123

doc/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CONTRIBUTING.md

doc/docfx.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"src": [
55
{
66
"files": [
7-
"KubernetesClient/KubernetesClient.csproj"
7+
"KubernetesClient/bin/Release/net8.0/KubernetesClient.dll"
88
],
99
"src": "../src"
1010
}
@@ -20,6 +20,7 @@
2020
"files": [
2121
"api/**.yml",
2222
"index.md",
23+
"CONTRIBUTING.md",
2324
"toc.yml"
2425
]
2526
}

examples/attach/Attach.cs

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,29 @@
33
using System;
44
using System.Threading.Tasks;
55

6-
namespace attach
7-
{
8-
internal class Attach
9-
{
10-
private static async Task Main(string[] args)
11-
{
12-
var config = KubernetesClientConfiguration.BuildConfigFromConfigFile();
13-
IKubernetes client = new Kubernetes(config);
14-
Console.WriteLine("Starting Request!");
6+
var config = KubernetesClientConfiguration.BuildConfigFromConfigFile();
7+
IKubernetes client = new Kubernetes(config);
8+
Console.WriteLine("Starting Request!");
159

16-
var list = client.CoreV1.ListNamespacedPod("default");
17-
var pod = list.Items[0];
18-
await AttachToPod(client, pod).ConfigureAwait(false);
19-
}
10+
var list = client.CoreV1.ListNamespacedPod("default");
11+
var pod = list.Items[0];
12+
await AttachToPod(client, pod).ConfigureAwait(false);
2013

21-
private static async Task AttachToPod(IKubernetes client, V1Pod pod)
22-
{
23-
var webSocket =
24-
await client.WebSocketNamespacedPodAttachAsync(pod.Metadata.Name, "default",
25-
pod.Spec.Containers[0].Name).ConfigureAwait(false);
14+
async Task AttachToPod(IKubernetes client, V1Pod pod)
15+
{
16+
var webSocket =
17+
await client.WebSocketNamespacedPodAttachAsync(pod.Metadata.Name, "default",
18+
pod.Spec.Containers[0].Name).ConfigureAwait(false);
2619

27-
var demux = new StreamDemuxer(webSocket);
28-
demux.Start();
20+
var demux = new StreamDemuxer(webSocket);
21+
demux.Start();
2922

30-
var buff = new byte[4096];
31-
var stream = demux.GetStream(1, 1);
32-
while (true)
33-
{
34-
var read = stream.Read(buff, 0, 4096);
35-
var str = System.Text.Encoding.Default.GetString(buff);
36-
Console.WriteLine(str);
37-
}
38-
}
23+
var buff = new byte[4096];
24+
var stream = demux.GetStream(1, 1);
25+
while (true)
26+
{
27+
var read = stream.Read(buff, 0, 4096);
28+
var str = System.Text.Encoding.Default.GetString(buff);
29+
Console.WriteLine(str);
3930
}
4031
}

0 commit comments

Comments
 (0)