-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use helm to generate Antrea Windows manifests
Fixes #5564 Signed-off-by: Shikhar Soni <shikharish05@gmail.com>
- Loading branch information
1 parent
b109bf8
commit f1d17c0
Showing
27 changed files
with
305 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: v2 | ||
name: antrea-windows | ||
type: application | ||
displayName: Antrea | ||
home: https://antrea.io/ | ||
version: 0.0.0 | ||
appVersion: latest | ||
kubeVersion: ">= 1.19.0-0" | ||
icon: https://raw.githubusercontent.com/antrea-io/antrea/main/docs/assets/logo/antrea_logo.svg | ||
description: Kubernetes networking based on Open vSwitch for Windows Nodes | ||
keywords: | ||
- Kubernetes | ||
- CNCF | ||
- Networking | ||
- CNI | ||
- Security | ||
- Open vSwitch | ||
- OVS | ||
- Windows | ||
sources: | ||
- https://github.com/antrea-io/antrea | ||
annotations: | ||
artifacthub.io/license: Apache-2.0 | ||
artifacthub.io/operator: "false" | ||
artifacthub.io/prerelease: "false" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
build/charts/antrea-windows/templates/configmaps/antrea-agent-windows.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
data: | ||
{{- tpl ((.Files.Glob "conf/Install-WindowsCNI.ps1").AsConfig) . | nindent 2 | replace " \n" "\n" }} | ||
{{- tpl ((.Files.Glob "conf/Run-AntreaAgent.ps1").AsConfig) . | nindent 2 | replace " \n" "\n" }} | ||
{{- if .Values.includeOVS }} | ||
{{- tpl ((.Files.Glob "conf/ovs/Install-OVSDriver.ps1").AsConfig) . | nindent 2 | replace " \n" "\n" }} | ||
{{- tpl ((.Files.Glob "conf/ovs/Run-AntreaOVS.ps1").AsConfig) . | nindent 2 | replace " \n" "\n" }} | ||
{{- tpl ((.Files.Glob "conf/ovs/VMSwitchExtension-AntreaAgent.ps1").AsConfig) . | nindent 2 | replace " \n" "\n" }} | ||
{{- end }} | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app: antrea | ||
name: antrea-agent-windows | ||
namespace: kube-system |
10 changes: 10 additions & 0 deletions
10
build/charts/antrea-windows/templates/configmaps/antrea-windows-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
data: | ||
{{- tpl ((.Files.Glob "conf/antrea-agent.conf").AsConfig) . | nindent 2 | replace " \n" "\n" }} | ||
{{- tpl ((.Files.Glob "conf/antrea-cni.conflist").AsConfig) . | nindent 2 | replace " \n" "\n" }} | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app: antrea | ||
name: antrea-windows-config | ||
namespace: kube-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
labels: | ||
app: antrea | ||
component: antrea-agent | ||
name: antrea-agent-windows | ||
namespace: kube-system | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: antrea | ||
component: antrea-agent | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/agent-windows: {{ include (print $.Template.BasePath "/configmaps/antrea-agent-windows.yaml") . | sha256sum }} | ||
checksum/windows-config: {{ include (print $.Template.BasePath "/configmaps/antrea-windows-config.yaml") . | sha256sum }} | ||
microsoft.com/hostprocess-inherit-user: "true" | ||
labels: | ||
app: antrea | ||
component: antrea-agent | ||
spec: | ||
containers: | ||
- args: | ||
- -file | ||
- $env:CONTAINER_SANDBOX_MOUNT_POINT/var/lib/antrea-windows/Run-AntreaAgent.ps1 | ||
command: | ||
- powershell | ||
env: | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} | ||
imagePullPolicy: IfNotPresent | ||
{{- if .Values.includeOVS }} | ||
lifecycle: | ||
postStart: | ||
exec: | ||
command: | ||
- powershell | ||
- -file | ||
- $env:CONTAINER_SANDBOX_MOUNT_POINT/var/lib/antrea-windows/VMSwitchExtension-AntreaAgent.ps1 | ||
- -VMSwitchExtension | ||
- enable | ||
preStop: | ||
exec: | ||
command: | ||
- powershell | ||
- -file | ||
- $env:CONTAINER_SANDBOX_MOUNT_POINT/var/lib/antrea-windows/VMSwitchExtension-AntreaAgent.ps1 | ||
- -VMSwitchExtension | ||
- disable | ||
{{- end}} | ||
name: antrea-agent | ||
volumeMounts: | ||
- mountPath: /etc/antrea | ||
name: antrea-windows-config | ||
- mountPath: /var/lib/antrea-windows | ||
name: antrea-agent-windows | ||
- mountPath: /var/log/antrea/ | ||
name: var-log-antrea | ||
{{- if .Values.includeOVS }} | ||
- args: | ||
- -file | ||
- $env:CONTAINER_SANDBOX_MOUNT_POINT/var/lib/antrea-windows/Run-AntreaOVS.ps1 | ||
command: | ||
- powershell | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} | ||
imagePullPolicy: IfNotPresent | ||
name: antrea-ovs | ||
volumeMounts: | ||
- mountPath: /var/lib/antrea-windows | ||
name: antrea-agent-windows | ||
- mountPath: /var/log/openvswitch | ||
name: var-log-antrea | ||
subPath: openvswitch | ||
{{- end}} | ||
hostNetwork: true | ||
initContainers: | ||
- args: | ||
- -file | ||
- $env:CONTAINER_SANDBOX_MOUNT_POINT/var/lib/antrea-windows/Install-WindowsCNI.ps1 | ||
command: | ||
- powershell | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} | ||
imagePullPolicy: IfNotPresent | ||
name: install-cni | ||
volumeMounts: | ||
- mountPath: /etc/antrea | ||
name: antrea-windows-config | ||
readOnly: true | ||
- mountPath: /var/lib/antrea-windows | ||
name: antrea-agent-windows | ||
{{- if .Values.includeOVS }} | ||
- args: | ||
- -file | ||
- $env:CONTAINER_SANDBOX_MOUNT_POINT/var/lib/antrea-windows/Install-OVSDriver.ps1 | ||
command: | ||
- powershell | ||
image: antrea/antrea-windows:latest | ||
imagePullPolicy: IfNotPresent | ||
name: install-ovs-driver | ||
volumeMounts: | ||
- mountPath: /var/lib/antrea-windows | ||
name: antrea-agent-windows | ||
{{- end }} | ||
nodeSelector: | ||
kubernetes.io/os: windows | ||
priorityClassName: system-node-critical | ||
securityContext: | ||
windowsOptions: | ||
hostProcess: true | ||
runAsUserName: NT AUTHORITY\SYSTEM | ||
serviceAccountName: antrea-agent | ||
tolerations: | ||
- key: CriticalAddonsOnly | ||
operator: Exists | ||
- effect: NoSchedule | ||
operator: Exists | ||
volumes: | ||
- configMap: | ||
name: antrea-windows-config | ||
name: antrea-windows-config | ||
- configMap: | ||
defaultMode: 420 | ||
name: antrea-agent-windows | ||
name: antrea-agent-windows | ||
- hostPath: | ||
path: /var/log/antrea/ | ||
type: DirectoryOrCreate | ||
name: var-log-antrea | ||
updateStrategy: | ||
type: RollingUpdate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -- Container image used for Antrea Windows Nodes | ||
image: | ||
repository: "antrea/antrea-windows" | ||
tag: "latest" | ||
|
||
# -- Enable release mode | ||
release: false | ||
|
||
# -- Enable running Windows OVS processes inside antrea-ovs container in antrea-agent pod | ||
includeOVS: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.