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
08e9ef0e
Commit
08e9ef0e
authored
Mar 25, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #22195 from jeffmendoza/wordpress-update
Auto commit by PR queue bot
parents
590038dc
fb601cd1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
193 additions
and
90 deletions
+193
-90
kubectl_dash_f.go
cmd/mungedocs/kubectl_dash_f.go
+9
-0
examples_test.go
examples/examples_test.go
+4
-4
OWNERS
examples/mysql-wordpress-pd/OWNERS
+2
-0
README.md
examples/mysql-wordpress-pd/README.md
+0
-0
WordPress.png
examples/mysql-wordpress-pd/WordPress.png
+0
-0
gce-volumes.yaml
examples/mysql-wordpress-pd/gce-volumes.yaml
+25
-0
local-volumes.yaml
examples/mysql-wordpress-pd/local-volumes.yaml
+27
-0
mysql-deployment.yaml
examples/mysql-wordpress-pd/mysql-deployment.yaml
+63
-0
mysql-service.yaml
examples/mysql-wordpress-pd/mysql-service.yaml
+0
-13
mysql.yaml
examples/mysql-wordpress-pd/mysql.yaml
+0
-31
wordpress-deployment.yaml
examples/mysql-wordpress-pd/wordpress-deployment.yaml
+63
-0
wordpress-service.yaml
examples/mysql-wordpress-pd/wordpress-service.yaml
+0
-14
wordpress.yaml
examples/mysql-wordpress-pd/wordpress.yaml
+0
-28
No files found.
cmd/mungedocs/kubectl_dash_f.go
View file @
08e9ef0e
...
@@ -106,6 +106,15 @@ func gotDashF(lineNum int, fields []string, fieldNum int) error {
...
@@ -106,6 +106,15 @@ func gotDashF(lineNum int, fields []string, fieldNum int) error {
// Absolute paths tend to be /tmp/* and created in the same example.
// Absolute paths tend to be /tmp/* and created in the same example.
return
nil
return
nil
}
}
if
strings
.
HasPrefix
(
target
,
"$"
)
{
// Allow the start of the target to be an environment
// variable that points to the root of the kubernetes
// repo.
split
:=
strings
.
SplitN
(
target
,
"/"
,
2
)
if
len
(
split
)
==
2
{
target
=
split
[
1
]
}
}
// If we got here we expect the file to exist.
// If we got here we expect the file to exist.
_
,
err
:=
os
.
Stat
(
path
.
Join
(
repoRoot
,
target
))
_
,
err
:=
os
.
Stat
(
path
.
Join
(
repoRoot
,
target
))
...
...
examples/examples_test.go
View file @
08e9ef0e
...
@@ -311,10 +311,10 @@ func TestExampleObjectSchemas(t *testing.T) {
...
@@ -311,10 +311,10 @@ func TestExampleObjectSchemas(t *testing.T) {
"mongo-service"
:
&
api
.
Service
{},
"mongo-service"
:
&
api
.
Service
{},
},
},
"../examples/mysql-wordpress-pd"
:
{
"../examples/mysql-wordpress-pd"
:
{
"
mysql-service"
:
&
api
.
Servic
e
{},
"
gce-volumes"
:
&
api
.
PersistentVolum
e
{},
"
mysql"
:
&
api
.
Pod
{},
"
local-volumes"
:
&
api
.
PersistentVolume
{},
"
wordpress-service"
:
&
api
.
Service
{},
"
mysql-deployment"
:
&
api
.
Service
{},
"wordpress
"
:
&
api
.
Pod
{},
"wordpress
-deployment"
:
&
api
.
Service
{},
},
},
"../examples/nfs"
:
{
"../examples/nfs"
:
{
"nfs-busybox-rc"
:
&
api
.
ReplicationController
{},
"nfs-busybox-rc"
:
&
api
.
ReplicationController
{},
...
...
examples/mysql-wordpress-pd/OWNERS
0 → 100644
View file @
08e9ef0e
assignees:
- jeffmendoza
examples/mysql-wordpress-pd/README.md
View file @
08e9ef0e
This diff is collapsed.
Click to expand it.
examples/mysql-wordpress-pd/WordPress.png
0 → 100644
View file @
08e9ef0e
28.3 KB
examples/mysql-wordpress-pd/gce-volumes.yaml
0 → 100644
View file @
08e9ef0e
apiVersion
:
v1
kind
:
PersistentVolume
metadata
:
name
:
wordpress-pv-1
spec
:
capacity
:
storage
:
20Gi
accessModes
:
-
ReadWriteOnce
gcePersistentDisk
:
pdName
:
wordpress-1
fsType
:
ext4
---
apiVersion
:
v1
kind
:
PersistentVolume
metadata
:
name
:
wordpress-pv-2
spec
:
capacity
:
storage
:
20Gi
accessModes
:
-
ReadWriteOnce
gcePersistentDisk
:
pdName
:
wordpress-2
fsType
:
ext4
examples/mysql-wordpress-pd/local-volumes.yaml
0 → 100644
View file @
08e9ef0e
apiVersion
:
v1
kind
:
PersistentVolume
metadata
:
name
:
local-pv-1
labels
:
type
:
local
spec
:
capacity
:
storage
:
20Gi
accessModes
:
-
ReadWriteOnce
hostPath
:
path
:
/tmp/pv-1
---
apiVersion
:
v1
kind
:
PersistentVolume
metadata
:
name
:
local-pv-2
labels
:
type
:
local
spec
:
capacity
:
storage
:
20Gi
accessModes
:
-
ReadWriteOnce
hostPath
:
path
:
/tmp/pv-2
examples/mysql-wordpress-pd/mysql-deployment.yaml
0 → 100644
View file @
08e9ef0e
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
wordpress-mysql
labels
:
app
:
wordpress
spec
:
ports
:
-
port
:
3306
selector
:
app
:
wordpress
tier
:
mysql
clusterIP
:
None
---
apiVersion
:
v1
kind
:
PersistentVolumeClaim
metadata
:
name
:
mysql-pv-claim
labels
:
app
:
wordpress
spec
:
accessModes
:
-
ReadWriteOnce
resources
:
requests
:
storage
:
20Gi
---
apiVersion
:
extensions/v1beta1
kind
:
Deployment
metadata
:
name
:
wordpress-mysql
labels
:
app
:
wordpress
spec
:
strategy
:
type
:
Recreate
template
:
metadata
:
labels
:
app
:
wordpress
tier
:
mysql
spec
:
containers
:
-
image
:
mysql:5.6
name
:
mysql
env
:
# $ kubectl create secret generic mysql-pass --from-file=password.txt
# make sure password.txt does not have a trailing newline
-
name
:
MYSQL_ROOT_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
mysql-pass
key
:
password.txt
ports
:
-
containerPort
:
3306
name
:
mysql
volumeMounts
:
-
name
:
mysql-persistent-storage
mountPath
:
/var/lib/mysql
volumes
:
-
name
:
mysql-persistent-storage
persistentVolumeClaim
:
claimName
:
mysql-pv-claim
examples/mysql-wordpress-pd/mysql-service.yaml
deleted
100644 → 0
View file @
590038dc
apiVersion
:
v1
kind
:
Service
metadata
:
labels
:
name
:
mysql
name
:
mysql
spec
:
ports
:
# the port that this service should serve on
-
port
:
3306
# label keys and values that must match in order to receive traffic for this service
selector
:
name
:
mysql
examples/mysql-wordpress-pd/mysql.yaml
deleted
100644 → 0
View file @
590038dc
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
mysql
labels
:
name
:
mysql
spec
:
containers
:
-
resources
:
limits
:
cpu
:
0.5
image
:
mysql:5.6
name
:
mysql
env
:
-
name
:
MYSQL_ROOT_PASSWORD
# change this
value
:
yourpassword
ports
:
-
containerPort
:
3306
name
:
mysql
volumeMounts
:
# name must match the volume name below
-
name
:
mysql-persistent-storage
# mount path within the container
mountPath
:
/var/lib/mysql
volumes
:
-
name
:
mysql-persistent-storage
gcePersistentDisk
:
# This GCE PD must already exist.
pdName
:
mysql-disk
fsType
:
ext4
examples/mysql-wordpress-pd/wordpress-deployment.yaml
0 → 100644
View file @
08e9ef0e
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
wordpress
labels
:
app
:
wordpress
spec
:
ports
:
-
port
:
80
selector
:
app
:
wordpress
tier
:
frontend
type
:
LoadBalancer
---
apiVersion
:
v1
kind
:
PersistentVolumeClaim
metadata
:
name
:
wp-pv-claim
labels
:
app
:
wordpress
spec
:
accessModes
:
-
ReadWriteOnce
resources
:
requests
:
storage
:
20Gi
---
apiVersion
:
extensions/v1beta1
kind
:
Deployment
metadata
:
name
:
wordpress
labels
:
app
:
wordpress
spec
:
strategy
:
type
:
Recreate
template
:
metadata
:
labels
:
app
:
wordpress
tier
:
frontend
spec
:
containers
:
-
image
:
wordpress:4.4-apache
name
:
wordpress
env
:
-
name
:
WORDPRESS_DB_HOST
value
:
wordpress-mysql
-
name
:
WORDPRESS_DB_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
mysql-pass
key
:
password.txt
ports
:
-
containerPort
:
80
name
:
wordpress
volumeMounts
:
-
name
:
wordpress-persistent-storage
mountPath
:
/var/www/html
volumes
:
-
name
:
wordpress-persistent-storage
persistentVolumeClaim
:
claimName
:
wp-pv-claim
examples/mysql-wordpress-pd/wordpress-service.yaml
deleted
100644 → 0
View file @
590038dc
apiVersion
:
v1
kind
:
Service
metadata
:
labels
:
name
:
wpfrontend
name
:
wpfrontend
spec
:
ports
:
# the port that this service should serve on
-
port
:
80
# label keys and values that must match in order to receive traffic for this service
selector
:
name
:
wordpress
type
:
LoadBalancer
examples/mysql-wordpress-pd/wordpress.yaml
deleted
100644 → 0
View file @
590038dc
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
wordpress
labels
:
name
:
wordpress
spec
:
containers
:
-
image
:
wordpress
name
:
wordpress
env
:
-
name
:
WORDPRESS_DB_PASSWORD
# change this - must match mysql.yaml password
value
:
yourpassword
ports
:
-
containerPort
:
80
name
:
wordpress
volumeMounts
:
# name must match the volume name below
-
name
:
wordpress-persistent-storage
# mount path within the container
mountPath
:
/var/www/html
volumes
:
-
name
:
wordpress-persistent-storage
gcePersistentDisk
:
# This GCE PD must already exist.
pdName
:
wordpress-disk
fsType
:
ext4
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