Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions code/srv/srv/utils/tenant-automator.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,15 @@ const deregisterServiceBroker = async (context) => {
}

const createKymaApiRule = async (context) => {
await kyma.createApiRule(kyma.getApiRuleTmpl(context.subdomain))
if (process.env.KYMA_GATEWAY) {
await kyma.createApiRule(kyma.getApiRuleTmpl(context.subdomain))
}
}

const deleteKymaApiRule = async (context) => {
await kyma.deleteApiRule(kyma.getApiRuleTmpl(context.subdomain))
if (process.env.KYMA_GATEWAY) {
await kyma.deleteApiRule(kyma.getApiRuleTmpl(context.subdomain))
}
}

const workflowStepsCFOnboarding = [
Expand Down
6 changes: 6 additions & 0 deletions deploy/cap-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ kubectl apply -n cap-operator-system -f https://github.com/SAP/cap-operator-life

This section uses [Docker](https://docs.docker.com/get-started/get-docker/) to build you container images.

Install `npm` packages (required to execute scripts independent of the OS).
```
## execute from deploy/cap-operator ##
npm install
```

To build your images execute the following command:
```
## execute from deploy/cap-operator ##
Expand Down
11 changes: 6 additions & 5 deletions deploy/cap-operator/chart/templates/broker-credentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ metadata:
name: {{ template "capApplicationVersionName" . }}-brk-cred
type: Opaque
data:
{{- if and .Values.broker.credentials.user .Values.broker.credentials.password }}
credentials.json: {{ printf "{\n \"%s\" : \"%s\" \n}\n" .Values.broker.credentials.user .Values.broker.credentials.password | b64enc }}
{{- else }}
ERROR-.broker.credentials.user-or-.broker.credentials.password-missing:
{{- end }}
BROKER_USER : {{ "broker-user" | b64enc | quote }}
{{- $password := (randAlphaNum 32 | b64enc ) }}
BROKER_PASSWORD : {{ $password | quote }}
{{- $salt := ( randAlphaNum 32 ) }}
{{- $hash := printf "sha256:%s:%s" ( $salt | b64enc ) ( ( printf "%s%s" $salt $password ) | sha256sum | b64enc ) }}
BROKER_HASH : {{ $hash | b64enc | quote }}
18 changes: 6 additions & 12 deletions deploy/cap-operator/chart/templates/capapplication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,13 @@ metadata:
{{- end }}
name: cap-{{.Values.app.name}}
spec:
domains:
primary: {{.Values.app.domains.primary}}
{{- if .Values.app.domains.secondary }}
secondary:
{{- range .Values.app.domains.secondary }}
- {{.}}
{{- end }}
domainRefs:
- kind: Domain
name: dom-{{$.Values.app.name}}
{{- range $index, $domain := $.Values.app.domains.secondary }}
- kind: Domain
name: dom-{{$.Values.app.name}}-sec-{{$index}}
{{- end }}
istioIngressGatewayLabels:
{{- range $k, $v := .Values.ingressGatewayLabels }}
- name: {{ $k }}
value: {{ $v | default "invalidValue"}}
{{ end }}
btpAppName: "{{.Values.app.name}}"
globalAccountId: "{{.Values.btp.globalAccountId}}"
provider:
Expand Down
42 changes: 30 additions & 12 deletions deploy/cap-operator/chart/templates/capapplicationversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,17 +263,25 @@ spec:
key: config.json
- name: SBF_CATALOG_FILE
value: "/etc/config/catalog.json"
- name: SBF_BROKER_CREDENTIALS
valueFrom:
secretKeyRef:
name: {{ template "capApplicationVersionName" . }}-brk-cred
key: credentials.json
- name: SBF_CREDENTIALS_PROVIDER_SERVICE
value: "{{ include "xsuaaApiInstance" . }}"
- name: VCAP_APPLICATION # TODO - remove unnecessary workaround after fixing broker/start.js
value: "{}"
- name: NODE_ENV
value: production
- name: BROKER_USER
valueFrom:
secretKeyRef:
name: {{ template "capApplicationVersionName" . }}-brk-cred
key: BROKER_USER
- name: BROKER_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "capApplicationVersionName" . }}-brk-cred
key: BROKER_PASSWORD
- name: BROKER_HASH
valueFrom:
secretKeyRef:
name: {{ template "capApplicationVersionName" . }}-brk-cred
key: BROKER_HASH
volumeMounts:
- name: tmp
mountPath: /tmp
Expand Down Expand Up @@ -477,11 +485,6 @@ spec:
value: production
- name: MTX_COLLECT_LOGS
value: "true"
- name: SBF_BROKER_CREDENTIALS
valueFrom:
secretKeyRef:
name: {{ template "capApplicationVersionName" . }}-brk-cred
key: credentials.json
- name: BROKER_NAME
value: "{{.Values.app.name}}-broker"
- name: BROKER_URL
Expand All @@ -492,6 +495,21 @@ spec:
value: "{{.Values.app.name}}"
- name: PROVIDER_TENANT_ID
value: {{.Values.btp.provider.tenantId}}
- name: BROKER_USER
valueFrom:
secretKeyRef:
name: {{ template "capApplicationVersionName" . }}-brk-cred
key: BROKER_USER
- name: BROKER_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "capApplicationVersionName" . }}-brk-cred
key: BROKER_PASSWORD
- name: BROKER_HASH
valueFrom:
secretKeyRef:
name: {{ template "capApplicationVersionName" . }}-brk-cred
key: BROKER_HASH
volumeMounts:
- name: tmp
mountPath: /tmp
Expand Down
28 changes: 28 additions & 0 deletions deploy/cap-operator/chart/templates/domains.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: sme.sap.com/v1alpha1
kind: Domain
metadata:
name: dom-{{.Values.app.name}}
spec:
domain: {{.Values.app.domains.primary}}
ingressSelector:
{{- range $k, $v := .Values.ingressGatewayLabels }}
{{$k}}: {{$v}}
{{ end }}
tlsMode: Simple
dnsMode: Wildcard

{{- range $index, $domain := $.Values.app.domains.secondary }}
---
apiVersion: sme.sap.com/v1alpha1
kind: Domain
metadata:
name: dom-{{$.Values.app.name}}-sec-{{$index}}
spec:
domain: {{$domain}}
ingressSelector:
{{- range $k, $v := $.Values.ingressGatewayLabels }}
{{$k}}: {{$v}}
{{ end }}
tlsMode: Simple
dnsMode: Subdomain
{{- end }}
4 changes: 0 additions & 4 deletions deploy/cap-operator/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,6 @@ broker:
id:
premium:
id:
credentials:
user:
password:


hdiDeployer:
# -- Container image for HDI Deployer (db-com)
Expand Down
Loading
Loading