-
Notifications
You must be signed in to change notification settings - Fork 370
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 (#6360)
Instead of Kustomize. This matches what we do for the Linux manifests. This change is only for manifest generation. We are not currently exposing the Helm chart to users. This could be done at a later time. Fixes #5564 Signed-off-by: Shikhar Soni <[email protected]>
- Loading branch information
1 parent
76bb211
commit 6fce4e8
Showing
26 changed files
with
325 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.22.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" |
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 @@ | ||
# antrea-windows | ||
|
||
![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) | ||
|
||
Kubernetes networking based on Open vSwitch for Windows Nodes | ||
|
||
**Homepage:** <https://antrea.io/> | ||
|
||
## Source Code | ||
|
||
* <https://github.com/antrea-io/antrea> | ||
|
||
## Requirements | ||
|
||
Kubernetes: `>= 1.22.0-0` | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| image | object | `{"repository":"antrea/antrea-windows","tag":"latest"}` | Container image used for Antrea Windows Nodes | | ||
| includeOVS | bool | `true` | Enable running Windows OVS processes inside antrea-ovs container in antrea-agent Pod | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.7.0](https://github.com/norwoodj/helm-docs/releases/v1.7.0) |
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: {{ .Values.image.repository }}:{{ .Values.image.tag }} | ||
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,7 @@ | ||
# -- Container image used for Antrea Windows Nodes | ||
image: | ||
repository: "antrea/antrea-windows" | ||
tag: "latest" | ||
|
||
# -- Enable running Windows OVS processes inside antrea-ovs container in antrea-agent Pod | ||
includeOVS: true |
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.