Skip to content

Commit 096f55f

Browse files
committed
wip
1 parent 81c651f commit 096f55f

File tree

9 files changed

+49
-54
lines changed

9 files changed

+49
-54
lines changed

installer/helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: csdp-installer
33
description: A Helm chart used for installing a CSDP runtime
44
type: application
5-
version: 0.1.5
5+
version: 0.1.6
66
appVersion: v0.0.4
77

88
dependencies:

installer/helm/install-values.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

installer/helm/templates/job.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ spec:
6969
secretKeyRef:
7070
name: csdp-installer
7171
key: runtime.ingressURL
72+
- name: CSDP_INGRESS_CLASS_NAME
73+
valueFrom:
74+
secretKeyRef:
75+
name: csdp-installer
76+
key: runtime.ingressClass
77+
- name: CSDP_INGRESS_CONTROLLER
78+
valueFrom:
79+
secretKeyRef:
80+
name: csdp-installer
81+
key: runtime.ingressController
7282
- name: CSDP_GIT_INTEGRATION_PROVIDER
7383
valueFrom:
7484
secretKeyRef:

installer/helm/templates/secret.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ stringData:
1010
runtime.repo: {{ .Values.csdpInstaller.runtime.repo }}
1111
runtime.gitToken: {{ .Values.csdpInstaller.runtime.gitToken }}
1212
runtime.ingressURL: {{ .Values.csdpInstaller.runtime.ingressURL }}
13+
runtime.ingressClass: {{ .Values.csdpInstaller.runtime.ingressClass }}
14+
runtime.ingressController: {{ .Values.csdpInstaller.runtime.ingressController }}
1315
runtime.cluster: {{ .Values.csdpInstaller.runtime.cluster }}
1416
{{- end }}

installer/helm/values.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ global:
22
# Controlls argo-cd image
33
image:
44
repository: quay.io/codefresh/argocd
5-
tag: v2.1.14-cap-CR-10462
5+
tag: v2.3.3-cap-CR-kustomize-components
66

77
argo-cd:
88
fullnameOverride: "argocd"
@@ -22,14 +22,14 @@ argo-cd:
2222
enable: true
2323
image:
2424
# -- Repository to use for the application set controller
25-
repository: quay.io/argoproj/argocd-applicationset
25+
repository: quay.io/codefresh/applicationset
2626
# -- Image pull policy for the application set controller
27-
pullPolicy: IfNotPresent
27+
pullPolicy: Always
2828
# -- Tag to use for the application set controller
29-
tag: "v0.4.1"
29+
tag: "v0.4.2"
3030

3131
csdpInstaller:
32-
enabled: false
32+
enabled: true
3333

3434
# CSDP platform details:
3535
platform:
@@ -47,6 +47,10 @@ csdpInstaller:
4747
gitToken: <GIT_TOKEN>
4848
# Ingress URL that will be used to reach to services inside of the cluster
4949
ingressURL: <INGRESS_URL>
50+
# Ingress class is the name of the ingress class
51+
ingressClass: ""
52+
# Ingress Controller is the type of ingress controller you are using
53+
ingressController: ""
5054
# Kubernetes cluster address or name that will be used to identify this cluster
5155
cluster: https://kubernetes.docker.internal:6443
5256

installer/install.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ CODEFRESH_SECRET_NAME="codefresh-token"
1717
REPO_CREDS_SECRET_NAME="autopilot-secret"
1818
ARGOCD_TOKEN_SECRET_NAME="argocd-token"
1919
ARGOCD_INITIAL_TOKEN_SECRET_NAME="argocd-initial-admin-secret"
20-
BOOTSTRAP_APP_NAME="autopilot-bootstrap"
20+
BOOTSTRAP_APP_NAME="csdp-bootstrap"
2121
ADDITIONAL_COMPONENTS="\nevents-reporter\nrollout-reporter\nworkflow-reporter"
22-
RUNTIME_DEF_URL="https://github.com/codefresh-io/cli-v2/releases/VERSION/download/runtime.yaml"
22+
RUNTIME_DEF_URL="https://github.com/codefresh-io/csdp-official-poc/releases/VERSION/download/runtime.yaml"
2323

2424
# Params:
2525
check_required_param "namespace" "${NAMESPACE}"
@@ -36,7 +36,7 @@ CSDP_RUNTIME_VERSION="${CSDP_RUNTIME_VERSION:-latest}"
3636
CSDP_GIT_INTEGRATION_PROVIDER="${CSDP_GIT_INTEGRATION_PROVIDER:-GITHUB}"
3737
CSDP_GIT_INTEGRATION_API_URL="${CSDP_GIT_INTEGRATION_API_URL:-https://api.github.com}"
3838
CSDP_GIT_INTEGRATION_TOKEN="${CSDP_GIT_INTEGRATION_TOKEN:-${CSDP_RUNTIME_GIT_TOKEN}}"
39-
CSDP_RUNTIME_REPO_CREDS_PATTERN=`echo ${CSDP_RUNTIME_REPO} | sed "s/\/[a-zA-Z0-9\?\._\-]*$//g"`
39+
CSDP_RUNTIME_REPO_CREDS_PATTERN=`echo ${CSDP_RUNTIME_REPO} | grep --color=never -E -o '^http[s]?:\/\/([a-zA-Z0-9\.]*)'`
4040

4141
create_codefresh_secret() {
4242
# Download runtime definition
@@ -65,6 +65,8 @@ create_codefresh_secret() {
6565
\"runtimeName\":\"${CSDP_RUNTIME_NAME}\",
6666
\"cluster\":\"${CSDP_RUNTIME_CLUSTER}\",
6767
\"ingressHost\":\"${CSDP_RUNTIME_INGRESS_URL}\",
68+
\"ingressClass\":\"${CSDP_INGRESS_CLASS_NAME}\",
69+
\"ingressController\":\"${CSDP_INGRESS_CONTROLLER}\",
6870
\"componentNames\":${COMPONENTS},
6971
\"runtimeVersion\":\"${RESOLVED_RUNTIME_VERSION}\"
7072
}"
@@ -113,14 +115,14 @@ create_bootstrap_application() {
113115
kind: Application
114116
metadata:
115117
labels:
116-
app.kubernetes.io/managed-by: argocd-autopilot
117118
app.kubernetes.io/name: ${BOOTSTRAP_APP_NAME}
118119
codefresh.io/internal: \"true\"
119120
name: ${BOOTSTRAP_APP_NAME}
120121
namespace: ${NAMESPACE}
121122
finalizers:
122123
- 'resources-finalizer.argocd.argoproj.io'
123124
spec:
125+
project: default
124126
destination:
125127
namespace: ${NAMESPACE}
126128
server: https://kubernetes.default.svc
@@ -129,10 +131,10 @@ create_bootstrap_application() {
129131
kind: Application
130132
jsonPointers:
131133
- /status
132-
project: default
133134
source:
134-
path: bootstrap
135+
path: base/bootstrap
135136
repoURL: ${CSDP_RUNTIME_REPO}
137+
targetRevision: HEAD
136138
syncPolicy:
137139
automated:
138140
allowEmpty: true
@@ -251,9 +253,11 @@ echo " runtime repo: ${CSDP_RUNTIME_REPO}"
251253
echo " runtime repo creds pattern: ${CSDP_RUNTIME_REPO_CREDS_PATTERN}"
252254
echo " runtime git-token: ****"
253255
echo " runtime cluster: ${CSDP_RUNTIME_CLUSTER}"
254-
echo " runtime ingress: ${CSDP_RUNTIME_INGRESS_URL}"
255256
echo " runtime name: ${CSDP_RUNTIME_NAME}"
256257
echo " runtime version: ${CSDP_RUNTIME_VERSION}"
258+
echo " runtime ingress: ${CSDP_RUNTIME_INGRESS_URL}"
259+
echo " ingress class name: ${CSDP_INGRESS_CLASS_NAME}"
260+
echo " ingress controller: ${CSDP_INGRESS_CONTROLLER}"
257261
echo "#######################################"
258262
echo ""
259263

installer/kustomize/csdp-installer.job.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ spec:
6565
secretKeyRef:
6666
name: csdp-installer
6767
key: runtime.ingressURL
68+
- name: CSDP_INGRESS_CLASS_NAME
69+
valueFrom:
70+
secretKeyRef:
71+
name: csdp-installer
72+
key: runtime.ingressClass
73+
- name: CSDP_INGRESS_CONTROLLER
74+
valueFrom:
75+
secretKeyRef:
76+
name: csdp-installer
77+
key: runtime.ingressController
6878
- name: CSDP_GIT_INTEGRATION_PROVIDER
6979
valueFrom:
7080
secretKeyRef:

installer/kustomize/csdp-installer.secret.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ stringData:
88
runtime.name: <RUNTIME_NAME>
99
runtime.repo: <RUNTIME_REPO>
1010
runtime.gitToken: <RUNTIME_GIT_TOKEN>
11-
runtime.ingressURL: <RUNTIME_INGRESS_URL>
1211
runtime.cluster: <RUNTIME_CLUSTER>
12+
runtime.ingressURL: <RUNTIME_INGRESS_URL>
13+
runtime.ingressClass: <RUNTIME_INGRESS_CLASS>
14+
runtime.ingressController: <RUNTIME_INGRESS_CONTROLLER>

installer/kustomize/example/kustomization.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ secretGenerator:
1616
- "runtime.name=<RUNTIME_NAME>"
1717
- "runtime.repo=<RUNTIME_REPO>"
1818
- "runtime.gitToken=<RUNTIME_GIT_TOKEN>"
19-
- "runtime.ingressURL=<RUNTIME_INGRESS_URL>"
2019
- "runtime.cluster=<RUNTIME_CLUSTER>"
20+
- "runtime.ingressURL=<RUNTIME_INGRESS_URL>"
21+
- "runtime.ingressClass=<RUNTIME_INGRESS_CLASS>"
22+
- "runtime.ingressController=<RUNTIME_INGRESS_CONTROLLER>"

0 commit comments

Comments
 (0)