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
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This requires that `kind` is installed and that either `podman` or `docker` is a
### Terminology

- `apps-flavor` - one of `prod`, `dev` or `air-gapped` is a global switch for configuring the clusters and deployed applications in different ways. The recommended value when working with local clusters is `dev`.
- `local-cluster-profile` - a reference to a preconfigured `Cluster` config passed to `kind` when creating or updating local clusters. We use profiles to differentiate between single-/multi-node clusters and/or to enable special features such as container image caching. Use `./scripts/local-clusters.sh list profiles` to see a list of built-in profiles.
- `local-cluster-profile` - a reference to a preconfigured `Cluster` config passed to `kind` when creating or updating local clusters. We use profiles to differentiate between single-/multi-node clusters and/or to enable special features such as container image caching. Use `./scripts/local-cluster.sh list profiles` to see a list of built-in profiles.
- `domain` - a local domain name. This can be arbitrary, but using a real domain (or subdomain) for which we have authority allows for setting up DNS based challenges for certificates issued by `cert-manager`.

### Setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,15 @@ spec:
acme.cert-manager.io/http01-solver: "true"
ports:
- port: 8089
{{- if .Values.objectStorage.localEnabled }}
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: minio-system
podSelector:
matchLabels:
app: minio
ports:
- port: 9000
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions helmfile.d/charts/networkpolicy/service-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,6 @@ dex:
enabled: true
ips:
- "0.0.0.0/0"

objectStorage:
localEnabled: false
6 changes: 6 additions & 0 deletions helmfile.d/values/minio.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ buckets:
{{- range $key, $value := .Values.objectStorage.buckets }}
- name: {{ $value }}
{{- end }}

ingress:
enabled: true
ingressClassName: nginx
hosts:
- minio.{{ .Values.global.baseDomain }}
11 changes: 11 additions & 0 deletions helmfile.d/values/networkpolicy/service-cluster.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,14 @@ dex:
connectors:
ips: {{- toYaml .Values.networkPolicies.dex.connectors.ips | nindent 6 }}
ports: {{- toYaml .Values.networkPolicies.dex.connectors.ports | nindent 6 }}

{{- with .Values.objectStorage }}
{{- if and
(eq .type "s3")
(.s3.regionEndpoint | hasPrefix "http://minio.")
(eq .s3.region "local")
}}
objectStorage:
localEnabled: true
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions scripts/local-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,10 @@ create() {
helmfile -e local_cluster -f "${ROOT}/helmfile.d" -lapp=tigera apply --output simple
fi

#install ingress-nginx
log.info "Installing ingress-nginx in SC"
"${ROOT}/bin/ck8s" ops helmfile sc -lapp=ingress-nginx apply --include-transitive-needs --output simple

# install s3
if ! [[ "${*}" =~ --skip-minio ]]; then
log.info "installing minio"
Expand Down
8 changes: 6 additions & 2 deletions scripts/local-clusters/configs/common-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ objectStorage:
type: s3
s3:
region: local
regionEndpoint: http://minio.minio-system.svc.cluster.local:9000
regionEndpoint: http://minio.${domain}:30080
forcePathStyle: true
calicoAccountant:
backend: nftables
Expand Down Expand Up @@ -53,7 +53,8 @@ networkPolicies:
ips:
- 0.0.0.0/0
ports:
- 9000
- 30080
- 80
scIngress:
ips:
- 0.0.0.0/0
Expand Down Expand Up @@ -88,3 +89,6 @@ networkPolicies:
packageRegistry:
ips:
- 0.0.0.0/0
ingressNginx:
ingressOverride:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ nodeLocalDns:
answer "{{ .Name }} 60 IN A 10.96.0.20"
fallthrough
}
template IN A $domain {
match "^minio\.$domain\.$"
answer "{{ .Name }} 60 IN A $sc_node_ip"
fallthrough
}
template IN A $domain {
match "\.$domain\.$"
answer "{{ .Name }} 60 IN A $wc_node_ip"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ nodeLocalDns:
errors
bind 169.254.20.10 10.96.0.10
template IN A $domain {
match "(^dex|^grafana|^harbor|^opensearch|\.ops)\.$domain\.$"
match "(^dex|^grafana|^harbor|^minio|^opensearch|\.ops)\.$domain\.$"
answer "{{ .Name }} 60 IN A $sc_node_ip"
fallthrough
}
Expand Down