Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
deployment-scripts
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
Yuji Itadori
deployment-scripts
Commits
59980e99
Commit
59980e99
authored
Feb 25, 2019
by
Yuji Itadori
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
a6c15fe8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
0 deletions
+73
-0
service-deployment.yaml
service-deployment.yaml
+73
-0
No files found.
service-deployment.yaml
0 → 100644
View file @
59980e99
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
$SERVICENAME
labels
:
app
:
$SERVICENAME
namespace
:
go
spec
:
ports
:
-
name
:
app
port
:
80
protocol
:
TCP
targetPort
:
80
selector
:
app
:
$SERVICENAME
tier
:
frontend
---
apiVersion
:
v1
kind
:
PersistentVolumeClaim
metadata
:
name
:
$SERVICENAME-pv-claim
labels
:
app
:
$SERVICENAME
namespace
:
go
spec
:
accessModes
:
-
ReadWriteOnce
resources
:
requests
:
storage
:
20Gi
---
apiVersion
:
apps/v1
# for versions before 1.9.0 use apps/v1beta2
kind
:
Deployment
metadata
:
name
:
$SERVICENAME
labels
:
app
:
$SERVICENAME
namespace
:
go
spec
:
selector
:
matchLabels
:
app
:
$SERVICENAME
tier
:
frontend
strategy
:
type
:
Recreate
template
:
metadata
:
labels
:
app
:
$SERVICENAME
tier
:
frontend
spec
:
containers
:
-
image
:
dockreg.vnetcloud.com/$SERVICENAME:ci-cd
name
:
$SERVICENAME
env
:
-
name
:
GO_DB_HOST
value
:
postgres-master
-
name
:
GO_DB_PASSWORD
value
:
"
postgres"
-
name
:
GO_DB_USERNAME
value
:
"
postgres"
-
name
:
GO_DB_NAME
value
:
"
$SERVICENAME"
ports
:
-
containerPort
:
80
name
:
$SERVICENAME
volumeMounts
:
-
name
:
$SERVICENAME-persistent-storage
mountPath
:
/var/www/html
volumes
:
-
name
:
$SERVICENAME-persistent-storage
persistentVolumeClaim
:
claimName
:
$SERVICENAME-pv-claim
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