Skip to content

Commit

Permalink
add Readme doc and modify template to be more intuitive
Browse files Browse the repository at this point in the history
  • Loading branch information
shokakucarrier committed Mar 7, 2023
1 parent 62face4 commit dd83a88
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
22 changes: 22 additions & 0 deletions BuildConfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: indy-sidecar-init-build
spec:
nodeSelector: null
output:
to:
kind: DockerImage
name: 'quay.io/example/indy-sidecar-init:latest'
pushSecret:
name: example
strategy:
type: Docker
dockerStrategy:
noCache: true
source:
type: Git
git:
uri: 'https://github.com/Commonjava/indy-sidecar-init.git'
ref: master
runPolicy: Serial
18 changes: 18 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Indy sidecar init
**Deployment**

The sidecar init container is meant to be init-container part of builder and sidecar pod, provides sidecar with initial repos downloaded from archive service.

1. Make sure you have right application.yaml from [indy-sidecar](https://github.com/commonjava/indy-sidecar) container, you must set `sidecar.archive-api` and `sidecar.local-repository` for this to work.

2. mount the same application.yaml across this sidecar-init container as well as the sidecar container.

3. Add init-container part to the pod deploymentconfig and mount preSeedRepo volume as the sidecar does (or whatever defined it in application.yaml config file)

Template of the deployment can be found in template/template-sidecar.yaml

---

**Build container image**

Use Dockerfile or BuildConfig.yaml(for Openshift) to build the container
8 changes: 5 additions & 3 deletions template/template-sidecar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ metadata:
spec:
initContainers:
- name : sidecar-init
image: quay.io/kaine/indy-sidecar-init:latest
image: quay.io/factory2/indy-sidecar-init:latest
volumeMounts:
# Same as the sidecar container has
- mountPath: /deployments/config/application.yaml
readOnly: true
name: sidecar-config
Expand All @@ -21,13 +22,14 @@ spec:
- "sidecar-init"
containers:
- name: sidecar
image: quay.io/kaine/indy-sidecar:latest
image: quay.io/factory2/indy-sidecar:latest
imagePullPolicy: Always
volumeMounts:
- mountPath: /deployments/config/proxy.yaml
readOnly: true
name: sidecar-config
subPath: proxy.yaml
# Same as the sidecar-init container has
- mountPath: /deployments/config/application.yaml
readOnly: true
name: sidecar-config
Expand All @@ -46,7 +48,7 @@ spec:
limits:
cpu: "1"
memory: "2Gi"
- name: jnlp
- name: builder
image: quay.io/factory2/jenkins-agent:maven-36-rhel7-latest
imagePullPolicy: Always
tty: true
Expand Down

0 comments on commit dd83a88

Please sign in to comment.