Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P pagerbot
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 16
    • Issues 16
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Stripe Community Contributions
  • pagerbot
  • Merge requests
  • !64
An error occurred while fetching the assigned milestone of the selected merge_request.

Allow passing pd & slack secrets via env var

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Dan Benamy requested to merge github/fork/dbenamy/master into master 6 years ago
  • Overview 1
  • Commits 18
  • Pipelines 0
  • Changes 26

In some deployments there are existing mechanism for handling secrets which would be preferred to having them in the mongo db.

This also unifies 2 code paths for configuring PagerDuty.

Testing:

  • Automated tests pass
  • Original flow of storing these secrets in mongo works
  • Using env vars instead works (although the admin will incorrectly show an error for the slack token and I had to make any dummy edit to cause it to save the bot settings)
Compare
  • master (base)

and
  • latest version
    4c166499
    18 commits, 2 years ago

26 files
+ 360
- 125

    Preferences

    File browser
    Compare changes
helmchart‎/pagerbot‎
temp‎lates‎
mongo-de‎ploy.yaml‎ +28 -0
mongo-p‎vc.yaml‎ +13 -0
mongo-s‎vc.yaml‎ +14 -0
pagerbot-admi‎n-deploy.yaml‎ +31 -0
pagerbot-d‎eploy.yaml‎ +29 -0
.helm‎ignore‎ +21 -0
Chart‎.yaml‎ +5 -0
value‎s.yaml‎ +18 -0
l‎ib‎
ad‎min‎
admin_s‎erver.rb‎ +8 -1
page‎rbot‎
plu‎gin‎
call_pe‎rson.rb‎ +9 -2
action_m‎anager.rb‎ +1 -1
datast‎ore.rb‎ +1 -5
pagerd‎uty.rb‎ +14 -4
slack_rtm_‎adapter.rb‎ +6 -3
pager‎bot.rb‎ +2 -1
test/unit‎/pagerbot‎
plu‎gins‎
call_pe‎rson.rb‎ +6 -1
schedule_o‎verride.rb‎ +6 -1
switch_‎shift.rb‎ +6 -1
action_m‎anager.rb‎ +6 -3
pagerd‎uty.rb‎ +7 -2
Docke‎rfile‎ +3 -2
Gem‎file‎ +1 -0
Gemfil‎e.lock‎ +66 -67
Make‎file‎ +8 -0
READ‎ME.md‎ +49 -29
pagerbot‎.gemspec‎ +2 -2
helmchart/pagerbot/templates/mongo-deploy.yaml 0 → 100644
+ 28
- 0
  • View file @ 4c166499

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
name: {{ .Values.mongo.name }}
name: {{ .Values.mongo.name }}
namespace: {{ .Values.namespace }}
spec:
spec:
replicas: 1
template:
metadata:
labels:
app: {{ .Values.mongo.name }}
spec:
containers:
- image: "{{ .Values.mongo.image.repository }}:{{ .Values.mongo.image.tag }}"
name: {{ .Values.mongo.name }}
ports:
- containerPort: 27017
volumeMounts:
- mountPath: /data/db
name: "{{ .Values.mongo.name }}-pvc"
restartPolicy: Always
volumes:
- name: "{{ .Values.mongo.name }}-pvc"
persistentVolumeClaim:
claimName: "{{ .Values.mongo.name }}-pvc"
helmchart/pagerbot/templates/mongo-pvc.yaml 0 → 100644
+ 13
- 0
  • View file @ 4c166499

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: {{ .Values.mongo.name }}
name: "{{ .Values.mongo.name }}-pvc"
namespace: {{ .Values.namespace }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
helmchart/pagerbot/templates/mongo-svc.yaml 0 → 100644
+ 14
- 0
  • View file @ 4c166499

apiVersion: v1
kind: Service
metadata:
labels:
app: {{ .Values.mongo.name }}
name: {{ .Values.mongo.name }}
namespace: {{ .Values.namespace }}
spec:
ports:
- name: "27017"
port: 27017
targetPort: 27017
selector:
app: {{ .Values.mongo.name }}
\ No newline at end of file
helmchart/pagerbot/templates/pagerbot-admin-deploy.yaml 0 → 100644
+ 31
- 0
  • View file @ 4c166499

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: {{ .Values.pagerbotAdmin.name }}
name: {{ .Values.pagerbotAdmin.name }}
namespace: {{ .Values.namespace }}
spec:
replicas: {{ .Values.pagerbotAdmin.replicas }}
strategy:
type: Recreate
template:
metadata:
labels:
app: {{ .Values.pagerbotAdmin.name }}
spec:
containers:
- args:
- ruby
- lib/pagerbot.rb
- admin
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
name: {{ .Values.pagerbotAdmin.name }}
ports:
- containerPort: 4567
env:
- name: LOG_LEVEL
value: "debug"
- name: MONGODB_URI
value: "mongodb://mongo:27017/pagerbot"
restartPolicy: Always
helmchart/pagerbot/templates/pagerbot-deploy.yaml 0 → 100644
+ 29
- 0
  • View file @ 4c166499

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: {{ .Values.pagerbot.name }}
name: {{ .Values.pagerbot.name }}
namespace: {{ .Values.namespace }}
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: {{ .Values.pagerbot.name }}
spec:
containers:
- args:
- ruby
- lib/pagerbot.rb
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
name: {{ .Values.pagerbot.name }}
env:
- name: LOG_LEVEL
value: "debug"
- name: MONGODB_URI
value: "mongodb://mongo:27017/pagerbot"
restartPolicy: Always
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: github/fork/dbenamy/master

Menu

Explore Projects Groups Snippets