-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add localstack to reference implementation
This adds localstack, which involves the following: 1) Install localstack as argo application This needs patching as the helm chart doesn't expose enough to access DNS port. I used kustomize + helmCharts directive in order to do a service patch. That required... 2) --enable-helm added to argocd, via configmap. 3) Delegation of localstack DNS to the localstack service, via Coredns Corefile 4) Add a new Crossplane ProviderConfig for localstack This should all be non-breaking changes One further enhancement I'll be working on is making the providerconfig selectable in the backstage template, so that a user can select between targetting localstack or aws proper when generating their app + bucket.
- Loading branch information
Showing
7 changed files
with
95 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,9 @@ data: | |
reload | ||
loadbalance | ||
} | ||
localhost.localstack.cloud:53 { | ||
errors | ||
cache 30 | ||
forward . 10.96.100.10 | ||
} |
File renamed without changes.
19 changes: 19 additions & 0 deletions
19
examples/ref-implementation/crossplane-providers/provider-config-localstack.yaml
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,19 @@ | ||
apiVersion: aws.crossplane.io/v1beta1 | ||
kind: ProviderConfig | ||
metadata: | ||
name: localstack | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "20" | ||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true | ||
spec: | ||
credentials: | ||
source: Secret | ||
secretRef: | ||
namespace: crossplane-system | ||
name: local-secret | ||
key: creds | ||
endpoint: | ||
hostnameImmutable: true | ||
url: | ||
type: Static | ||
static: http://localhost.localstack.cloud:4566 |
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,22 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: localstack | ||
namespace: argocd | ||
labels: | ||
example: ref-implementation | ||
spec: | ||
project: default | ||
source: | ||
repoURL: cnoe://localstack | ||
targetRevision: HEAD | ||
path: "." | ||
destination: | ||
namespace: localstack | ||
server: "https://kubernetes.default.svc" | ||
syncPolicy: | ||
automated: | ||
prune: true | ||
selfHeal: true | ||
syncOptions: | ||
- CreateNamespace=true |
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,30 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: localstack | ||
|
||
helmCharts: | ||
- name: localstack | ||
valuesInline: | ||
debug: true | ||
extraEnvVars: | ||
- name: DEFAULT_REGION | ||
value: "us-east-1" | ||
dnsPolicy: "Default" | ||
service: | ||
type: ClusterIP | ||
# Coredns needs a static IP to refer to for delegation | ||
clusterIP: 10.96.100.10 | ||
# this effectively disables the external service ports, which can be used for OpenSearch and a few other services | ||
# these don't play well with the services kustomize patch at this point | ||
# see https://docs.localstack.cloud/references/external-ports/ for more details | ||
externalServicePorts: | ||
start: 4510 | ||
end: 4510 | ||
dnsService: true | ||
releaseName: localstack | ||
repo: 'https://localstack.github.io/helm-charts' | ||
version: 0.6.12 | ||
|
||
patches: | ||
- path: service-patch.yaml |
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,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: localstack | ||
spec: | ||
ports: | ||
- name: edge | ||
port: 4566 | ||
targetPort: 4566 | ||
- name: dns-tcp | ||
port: 53 | ||
targetPort: 53 | ||
protocol: TCP | ||
- name: dns-udp | ||
port: 53 | ||
targetPort: 53 | ||
protocol: UDP |
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