Documentation ¶
Index ¶
- Variables
- func AffinityNodeParse(nodeAffinity *v1.NodeAffinity, nodeConfig *config.Directive)
- func AffinityParse(d *config.Directive, spec *v1.PodSpec)
- func HostAliasesParse(d *config.Directive, spec *v1.PodSpec)
- func PodSpecParse(directive *config.Directive, podSpec *v1.PodSpec)
- type AffinityExecution
Constants ¶
This section is empty.
Variables ¶
View Source
var Pod = plugins.ReduceHandler{Names: []string{"pod", "Pod"}, Handler: parse, Demo: `
pod test [label=value ...] {
label labelN valueN;
labels {
label1 value1;
label2 value2;
}
hostNetwork true;
hosts 172.16.100.12 api-vik8s-io;
hosts {
172.16.100.12 api-vik8s-io;
172.16.100.13 api-vik8s-io api2.vik8s.io;
}
affinity pod {
preferred weight:1 {
labels {
key-w2-1 ab;
key-w2-2 ab;
}
expr {
key-w1-1 In ab;
key-w1-2 In ab;
}
namespaces n1 n2 n3;
}
required key2:1 {
labels {
key-w2-1 ab;
key-w2-2 ab;
}
expr {
key-w1-1 In ab;
key-w1-2 In ab;
}
namespaces n1 n2 n3;
}
required key3:1 {
labels {
key-w2-1 ab;
key-w2-2 ab;
}
expr {
key-w1-1 In ab;
key-w1-2 In ab;
}
namespaces n1 n2 n3;
}
}
container continarName image [imagePullPolicy] {
args arg1 arg2 ... argN;
command cmd1 cmd2 ... cmdN;
resources {
requests memory=100Mi cpu=100m;
limit memory=100Mi cpu=100m;
}
envs {
ENV_VALUE test1123;
ENV_CONFIGMAP configMap name1 key1;
ENV_CONFIG config name1 key1;
ENV_FIELD field spec.nodeName;
ENV_RESOURCE_MEN resource container_name requests.memory;
ENV_RESOURCE_CPU res container_name requests.cpu;
}
env ENV_SECRET secret name12 k123;
envFrom configmap:config-name [prefix];
envFrom secret:secret-config-name [prefix];
port [name0] [[hostIP:]hostPort:]containerPort/protocol;
ports {
[name1] [[hostIP:]hostPort:]containerPort/protocol;
[name2] [[hostIP:]hostPort:]containerPort/protocol;
}
mount from:volume-name /data[:subPath];
mount from:from-volume-name /mountPath {
mountPropagation Bidirectional;
subPath in;
subPathExpr in.*;
readOnly true;
}
mount empty:emtpy-volue-data /data/in;
mount hostPath:etcd-config-data /data/etcd:/var/lib/etcd;
mount hostPath:localtime /etc/localtime:/etc/localtime File;
mount secret:secret-volume1 /data/secret;
mount configMap:configmap-volume1 /data/config/sub:sub;
mount configmap:volume-name:config-name /etc/nginx;
mount configmap:volume-name:config-name /etc/nginx/nginx.conf:nginx.conf {
#item.key:item.mode item.path;
nginx.conf:0655 [nginx.conf];
}
mount glusterfs:gluster-mysql-pvc /data[:subPath] {
endpoints enddd;
path mysql;
}
mount pvc:volume-name /data;
mount pvc:volume-name:pvc-name /data;
mount pvc:volume-name:pvc-name /data[:subPath] {
readOnly true;
}
resources {
requests cpu=250m;
limits cpu=100m;
}
}
volume empty:empty-volume1;
volume empty:empty-volume2 {
medium "medium";
sizeLimit "sizeLimit";
}
volume hostpath:hostpath-docker-volume1 /data/docker;
volume hostpath:hostpath-volume2 /etc/hosts File;
volume configmap:config-volume-1;
volume configmap:config-volume-2:0655;
volume configmap:config-volume-3 configmap-volume-config;
volume configmap:config-volume-4 configmap-volume-config{
k1 v1;
}
volumes {
configmap:config-volume4 ;
configmap:config-volume5 configmap-volume-config;
configmap:config-volume6 configmap-volume-config {
k1 v1;
}
configmap:config-volume7:0655 configmap-volume-config;
}
volume pvc:mysql-pvc;
volume pvc:mysql-pvc:mysql-pvc-config2;
volume pvc:mysql-pvc:mysql-pvc-config {
readOnly true;
}
volume secret:config-volume1;
volume secret:config-volume:secret-config;
volume secret:config-volume1:secret-config-volume1 {
defaultModule 0655;
items {
nginx.conf:0655 nginx.config;
}
}
volume secret:config-volume1:secret-config-volume1 {
defaultModule 0655;
nginx.conf:0655 nginx.config;
}
volume cephfs:ceph-mysql-pvc {
monitors monitorPath1 [monitorPath2 ...];
secretRef {
name b123;
}
secretFile a1;
}
volume glusterfs:glusetr-mysql {
endpoints http://10.24.0.2:24007;
path /data/mysql;
readOnly false;
}
volume ceph:ceph-mysql {
monitors name1 name2;
path /data/mysql;
secretFile sec123;
secretRef name=nam123;
}
}
`}
Functions ¶
func AffinityNodeParse ¶
func AffinityNodeParse(nodeAffinity *v1.NodeAffinity, nodeConfig *config.Directive)
Types ¶
type AffinityExecution ¶
type AffinityExecution struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.