Skip to content

Commit

Permalink
add resource limit to template
Browse files Browse the repository at this point in the history
  • Loading branch information
shokakucarrier committed Sep 7, 2021
1 parent e633d10 commit affb6b3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
File renamed without changes.
7 changes: 5 additions & 2 deletions sidecarinit/commands.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import click
import os
import sys
from pathlib import Path
import sidecarinit.config as config
import sidecarinit.download as download

@click.command()
@click.argument('env_yml', required=False, default='/deployments/config/application.yml') #help='Target environment, Same as sidecar application.yml'
@click.argument('env_yml', required=False, default='/deployments/config/application.yaml') #help='Target environment, Same as sidecar application.yml'
def run(env_yml):

suite = config.read_config(env_yml)
Expand All @@ -16,4 +17,6 @@ def run(env_yml):
Path(suite.local_repository).mkdir(parents=True, exist_ok=True)
Path(suite.local_repository + archive_name ).touch(exist_ok=True)

download.download_archive(suite.archive_api + archive_name, suite.local_repository)
download.download_archive(suite.archive_api + archive_name, suite.local_repository)

sys.exit(0);
13 changes: 12 additions & 1 deletion template/template-sidecar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app: "sidecar"
spec:
initcontainers:
initContainers:
- name : sidecar-init
image: quay.io/kaine/indy-sidecar-init:latest
volumeMounts:
Expand All @@ -17,6 +17,9 @@ spec:
env:
- name: HOME
value: /deployments
command:
- "sidecar-init"
containers:
- name: sidecar
image: quay.io/kaine/indy-sidecar:latest
imagePullPolicy: Always
Expand All @@ -39,6 +42,10 @@ spec:
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: "1"
memory: "2Gi"
- name: jnlp
image: quay.io/factory2/jenkins-agent:maven-36-rhel7-latest
imagePullPolicy: Always
Expand All @@ -51,6 +58,10 @@ spec:
subPath: settings.xml
name: sidecar-config
workingDir: /home/jenkins-11-openjdk
resources:
limits:
cpu: "2"
memory: "4Gi"
volumes:
- name: sidecar-config
configMap:
Expand Down

0 comments on commit affb6b3

Please sign in to comment.