Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddie Wassef committed Jan 2, 2024
1 parent 8ccdc12 commit 3bfd201
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 7 deletions.
35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/operator/ClusterNetworker/ClusterNetworker/bin/Debug/net6.0/ClusterNetworker.dll",
"args": [],
"cwd": "${workspaceFolder}/operator/ClusterNetworker/ClusterNetworker",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/operator/ClusterNetworker/ClusterNetworker/ClusterNetworker.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/operator/ClusterNetworker/ClusterNetworker/ClusterNetworker.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/operator/ClusterNetworker/ClusterNetworker/ClusterNetworker.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
Empty file.
28 changes: 21 additions & 7 deletions gitops/init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,28 @@ function CreateCluster {
@{
role = 'control-plane'
extraPortMappings = $extraPortMappings
},
@{
role = 'worker'
},
@{
role = 'worker'
},
@{
role = 'worker'
}
)
}
$TempFile = New-TemporaryFile
$yaml = ConvertTo-Yaml $obj | Out-File -FilePath $TempFile

if (kind get clusters | Where-Object { $_ -eq $clusterName }) {
Write-Host "Cluster $clusterName already exists"
}
else{
kind create cluster --config $TempFile.FullName
}

kind create cluster --config $TempFile.FullName
kind export kubeconfig --name $clusterName --kubeconfig=.\$clusterName.kubeconfig


Expand All @@ -56,10 +70,10 @@ function CreateCluster {
externalName = 'host.docker.internal'
}
}
$yaml = ConvertTo-Yaml $hostEntry | Out-File -FilePath .\gitops\common\$clusterName-host.yaml
New-Item -Path .\gitops\$clusterName -ItemType Directory -Force
New-Item -Path .\gitops\$clusterName\.gitkeep -ItemType File -Force
$kubeconfig = [System.IO.FileInfo]".\$clusterName.kubeconfig"
$yaml = ConvertTo-Yaml $hostEntry | Out-File -FilePath .\$clusterName-host.yaml
New-Item -Path .\$clusterName -ItemType Directory -Force
New-Item -Path .\$clusterName\.gitkeep -ItemType File -Force
$kubeconfig = [System.IO.FileInfo] "$PWD\$clusterName.kubeconfig"
SetupFlux $clusterName $kubeconfig
}

Expand All @@ -75,7 +89,7 @@ function SetupFlux {
[System.IO.FileInfo]
$kubeconfig
)

Write-Host $kubeconfig
# we will install flux on the cluster using the kubeconfig passed
kubectl apply -f https://github.com/fluxcd/flux2/releases/download/v0.31.5/install.yaml --kubeconfig $kubeconfig.FullName

Expand Down Expand Up @@ -137,7 +151,7 @@ function SetupFlux {
kind = 'GitRepository'
name = 'common'
}
path = './gitops/' + $clusterName
path = './gitops/$($clusterName)'
prune = $true
}
}
Expand Down
9 changes: 9 additions & 0 deletions gitops/testcluster-host.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Service
metadata:
namespace: vslive
name: testcluster
spec:
type: ExternalName
externalName: host.docker.internal

Empty file added gitops/testcluster/.gitkeep
Empty file.

0 comments on commit 3bfd201

Please sign in to comment.