generated from ContainerCraft/devcontainer
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,238 additions
and
153 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ Pulumi.*.yaml | |
tmp.* | ||
tmp | ||
.ssh | ||
tmp |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,54 @@ | ||
#--- | ||
## This net-attach-def defines macvlan-conf with | ||
## + ips capabilities to specify ip in pod annotation and | ||
## + mac capabilities to specify mac address in pod annotation | ||
## default gateway is defined as well | ||
#apiVersion: "k8s.cni.cncf.io/v1" | ||
#kind: NetworkAttachmentDefinition | ||
#metadata: | ||
# name: pod-br0 | ||
#spec: | ||
# config: '{ | ||
# "cniVersion": "0.3.1", | ||
# "name": "br0", | ||
# "plugins": [ | ||
# { | ||
# "type": "bridge", | ||
# "bridge": "br0", | ||
# "mode": "bridge", | ||
# "ipam": {} | ||
# },{ | ||
# "type": "tuning" | ||
# } | ||
# ] | ||
# }' | ||
--- | ||
# This net-attach-def defines macvlan-conf with | ||
# + ips capabilities to specify ip in pod annotation and | ||
# + mac capabilities to specify mac address in pod annotation | ||
# default gateway is defined as well | ||
apiVersion: "k8s.cni.cncf.io/v1" | ||
kind: NetworkAttachmentDefinition | ||
metadata: | ||
name: br0 | ||
spec: | ||
config: '{ | ||
"cniVersion": "0.3.1", | ||
"name": "br0", | ||
"plugins": [ | ||
{ | ||
"type": "bridge", | ||
"bridge": "br0", | ||
"mode": "bridge", | ||
"ipam": {} | ||
},{ | ||
"type": "tuning" | ||
} | ||
] | ||
}' | ||
--- | ||
# Define a pod with macvlan-conf, defined above, with ip address and mac, and | ||
# "gateway" overrides default gateway to use macvlan-conf's one. | ||
# without "gateway" in k8s.v1.cni.cncf.io/networks, default route will be cluster | ||
# network interface, eth0, even tough macvlan-conf has default gateway config. | ||
#apiVersion: v1 | ||
#kind: Pod | ||
#metadata: | ||
# name: samplepod | ||
# annotations: | ||
# k8s.v1.cni.cncf.io/networks: '[{"name": "br0"}]' | ||
#spec: | ||
# containers: | ||
# - name: samplepod | ||
# command: ["/bin/bash", "-c", "trap : TERM INT; sleep infinity & wait"] | ||
# image: dougbtv/centos-network | ||
# ports: | ||
# - containerPort: 80 | ||
# automountServiceAccountToken: false | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: samplepod | ||
annotations: | ||
k8s.v1.cni.cncf.io/networks: '[{"name": "br0"}]' | ||
k8s.v1.cni.cncf.io/networks: br0 | ||
spec: | ||
containers: | ||
- name: samplepod | ||
command: ["/bin/bash", "-c", "trap : TERM INT; sleep infinity & wait"] | ||
image: dougbtv/centos-network | ||
ports: | ||
- containerPort: 80 | ||
automountServiceAccountToken: false | ||
command: ["/bin/ash", "-c", "trap : TERM INT; sleep infinity & wait"] | ||
image: alpine |
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.