This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use generic fog provider for external blobstore
- Loading branch information
Showing
14 changed files
with
254 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,45 @@ | ||
{{- /* | ||
========================================================================================== | ||
| _capi.setProperty $property $value | ||
| _capi.setProperty $property [$value] | ||
+----------------------------------------------------------------------------------------- | ||
| There are 4 CAPI jobs that all share the same cloud_controller_ng specs file, | ||
| and therefore potentially all use the same "cc" properties. This template will | ||
| set a property in all of the jobs, so there is a single location to keep track | ||
| of instance groups these jobs run in. | ||
| | ||
| If the property starts with "buildpacks" then it will only be set in the cloud | ||
| controller jobs (ng, worker, clock), because the other job(s) don't use/define | ||
| these properties. | ||
| | ||
| $property can use dotted path notation to specify nested properties, | ||
| e.g. "diego.foo" to set the "cc.diego.foo" property. | ||
| | ||
| If the $value is omitted, the property is removed from the manifest. | ||
========================================================================================== | ||
*/}} | ||
{{- define "_capi.setProperty" }} | ||
{{- $property := index . 0 }} | ||
{{- $value := index . 1 }} | ||
{{- $params := . }} | ||
{{- $property := index $params 0 }} | ||
{{- $ig := dict }} | ||
{{- $_ := set $ig "cloud_controller_ng" "api" }} | ||
{{- $_ := set $ig "cloud_controller_worker" "cc-worker" }} | ||
{{- $_ := set $ig "cloud_controller_clock" "scheduler" }} | ||
{{- $_ := set $ig "cc_deployment_updater" "scheduler" }} | ||
{{- /* XXX cc_route_syncer is not in cf-deployment; see CF-K8s-Networking */}} | ||
{{- /* $_ := set $ig "cc_route_syncer" "???" */}} | ||
{{- /* The buildpacks properties are only defined for the ng/worker/clock jobs */}} | ||
{{- if not (hasPrefix "buildpacks" $property) }} | ||
{{- $_ := set $ig "cc_deployment_updater" "scheduler" }} | ||
{{- /* XXX cc_route_syncer is not in cf-deployment; see CF-K8s-Networking */}} | ||
{{- /* $_ := set $ig "cc_route_syncer" "???" */}} | ||
{{- end }} | ||
{{- range $job, $instance_group := $ig }} | ||
- type: replace | ||
path: /instance_groups/name={{ $instance_group }}/jobs/name={{ $job }}?/properties/cc/{{ $property | replace "." "/" }} | ||
value: {{ $value | toJson }} | ||
- path: /instance_groups/name={{ $instance_group }}/jobs/name={{ $job }}?/properties/cc/{{ $property | replace "." "/" }} | ||
{{- if eq (len $params) 1 }} | ||
type: remove | ||
{{- else }} | ||
type: replace | ||
value: {{ index $params 1 | toJson }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{- include "_config.load" $ }} | ||
|
||
{{- if eq .Values.features.blobstore.provider "fog" }} | ||
apiVersion: "v1" | ||
kind: "Secret" | ||
type: Opaque | ||
metadata: | ||
name: var-fog-connection | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
app.kubernetes.io/instance: {{ .Release.Name | quote }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service | quote }} | ||
app.kubernetes.io/name: {{ include "kubecf.fullname" . }} | ||
app.kubernetes.io/version: {{ default .Chart.Version .Chart.AppVersion | quote }} | ||
helm.sh/chart: {{ include "kubecf.chart" . }} | ||
annotations: | ||
quarks.cloudfoundry.org/json-value: "true" | ||
stringData: | ||
value: {{ .Values.features.blobstore.fog.connection | toJson | quote }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.