Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
fe74e492
Commit
fe74e492
authored
Mar 07, 2016
by
mdshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update configmap design doc
parent
56e6a752
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
configmap.md
docs/design/configmap.md
+20
-20
No files found.
docs/design/configmap.md
View file @
fe74e492
...
...
@@ -154,15 +154,15 @@ package api
type
EnvVarSource
struct
{
// other fields omitted
// S
pecifies a ConfigMap key
ConfigMap
*
ConfigMapSelector
`json:"configMap
,omitempty"`
// S
elects a key of a ConfigMap.
ConfigMap
KeyRef
*
ConfigMapKeySelector
`json:"configMapKeyRef
,omitempty"`
}
//
ConfigMapSelector selects a key of
a ConfigMap.
type
ConfigMapSelector
struct
{
// The
name of the ConfigMap to select a key
from.
ConfigMapName
string
`json:"configMapNam
e"`
// The key
of the ConfigMap
to select.
//
Selects a key from
a ConfigMap.
type
ConfigMap
Key
Selector
struct
{
// The
ConfigMap to select
from.
LocalObjectReference
`json:",inlin
e"`
// The key to select.
Key
string
`json:"key"`
}
```
...
...
@@ -249,28 +249,28 @@ spec:
env
:
-
name
:
ETCD_NUM_MEMBERS
valueFrom
:
configMap
:
configMapN
ame
:
etcd-env-config
configMap
KeyRef
:
n
ame
:
etcd-env-config
key
:
number-of-members
-
name
:
ETCD_INITIAL_CLUSTER_STATE
valueFrom
:
configMap
:
configMapN
ame
:
etcd-env-config
configMap
KeyRef
:
n
ame
:
etcd-env-config
key
:
initial-cluster-state
-
name
:
ETCD_DISCOVERY_TOKEN
valueFrom
:
configMap
:
configMapN
ame
:
etcd-env-config
configMap
KeyRef
:
n
ame
:
etcd-env-config
key
:
discovery-token
-
name
:
ETCD_DISCOVERY_URL
valueFrom
:
configMap
:
configMapN
ame
:
etcd-env-config
configMap
KeyRef
:
n
ame
:
etcd-env-config
key
:
discovery-url
-
name
:
ETCDCTL_PEERS
valueFrom
:
configMap
:
configMapN
ame
:
etcd-env-config
configMap
KeyRef
:
n
ame
:
etcd-env-config
key
:
etcdctl-peers
```
...
...
@@ -279,12 +279,12 @@ spec:
`redis-volume-config`
is intended to be used as a volume containing a config file:
```
yaml
apiVersion
:
extensions/v1beta
1
apiVersion
:
v
1
kind
:
ConfigMap
metadata
:
name
:
redis-volume-config
data
:
redis.conf
:
"
pidfile
/var/run/redis.pid
\n
port
6379
\n
tcp-backlog
511
\n
databases
1
\n
timeout
0
\n
"
redis.conf
:
"
pidfile
/var/run/redis.pid
\n
port
6379
\n
tcp-backlog
511
\n
databases
1
\n
timeout
0
\n
"
```
The following pod consumes the
`redis-volume-config`
in a volume:
...
...
@@ -298,7 +298,7 @@ spec:
containers
:
-
name
:
redis
image
:
kubernetes/redis
command
:
"
redis-server
/mnt/config-map/etc/redis.conf"
command
:
[
"
redis-server"
,
"
/mnt/config-map/etc/redis.conf"
]
ports
:
-
containerPort
:
6379
volumeMounts
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment