-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into modernify-keda
- Loading branch information
Showing
38 changed files
with
1,256 additions
and
36 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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,101 @@ | ||
<!--monopod:start--> | ||
# eck-operator | ||
| | | | ||
| - | - | | ||
| **OCI Reference** | `cgr.dev/chainguard/eck-operator` | | ||
|
||
|
||
* [View Image in Chainguard Academy](https://edu.chainguard.dev/chainguard/chainguard-images/reference/eck-operator/overview/) | ||
* [View Image Catalog](https://console.enforce.dev/images/catalog) for a full list of available tags. | ||
* [Contact Chainguard](https://www.chainguard.dev/chainguard-images) for enterprise support, SLAs, and access to older tags.* | ||
|
||
--- | ||
<!--monopod:end--> | ||
|
||
<!--overview:start--> | ||
Elastic Cloud on Kubernetes | ||
<!--overview:end--> | ||
|
||
<!--getting:start--> | ||
## Download this Image | ||
The image is available on `cgr.dev`: | ||
|
||
``` | ||
docker pull cgr.dev/chainguard/eck-operator:latest | ||
``` | ||
<!--getting:end--> | ||
|
||
<!--body:start--> | ||
|
||
## Usage | ||
|
||
There are several ways to deploy the ECK operator. You can follow up the [Quickstart guide](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-quickstart.html) or you can use the [Helm Chart](https://artifacthub.io/packages/helm/elastic/eck-operator) available in Artifact Hub to deploy the operator. | ||
|
||
The following example is going to show how to deploy the ECK operator using a its Helm Chart. | ||
|
||
### Deploy the ECK operator using Helm | ||
|
||
1. Add the Elastic Helm repository: | ||
|
||
```bash | ||
helm repo add elastic https://helm.elastic.co | ||
``` | ||
|
||
2. Install the ECK operator: | ||
|
||
```bash | ||
|
||
helm install elastic-operator elastic/eck-operator --namespace elastic-system --set image.repository=cgr.dev/chainguard/eck-operator --set image.tag=latest | ||
``` | ||
|
||
### Deploy an Elasticsearch cluster | ||
|
||
1. Create a file called `elasticsearch.yaml` with the following content: | ||
|
||
```yaml | ||
apiVersion: elasticsearch.k8s.elastic.co/v1 | ||
kind: Elasticsearch | ||
metadata: | ||
name: quickstart | ||
spec: | ||
version: 8.13.3 | ||
nodeSets: | ||
- name: default | ||
count: 1 | ||
config: | ||
node.store.allow_mmap: false | ||
``` | ||
2. Deploy the Elasticsearch cluster: | ||
``` | ||
kubectl apply -f elasticsearch.yaml | ||
``` | ||
|
||
3. Check the Elasticsearch cluster status: | ||
|
||
``` | ||
kubectl get elasticsearch quickstart -o=jsonpath='{.status.phase}' | ||
``` | ||
|
||
4. Access the Elasticsearch cluster: | ||
|
||
``` | ||
kubectl port-forward service/quickstart-es-http 9200 | ||
``` | ||
|
||
5. Get the password for the `elastic` user: | ||
|
||
``` | ||
PASSWORD=$(kubectl get secret quickstart-es-elastic-user -o=jsonpath='{.data.elastic}' | base64 --decode) | ||
``` | ||
|
||
6. Access the Elasticsearch cluster using curl: | ||
|
||
``` | ||
curl -u "elastic:$PASSWORD" -k "https://localhost:9200" | ||
``` | ||
|
||
That's it! You have deployed an Elasticsearch cluster using the ECK operator. | ||
|
||
<!--body: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
terraform { | ||
required_providers { | ||
apko = { source = "chainguard-dev/apko" } | ||
} | ||
} | ||
|
||
variable "extra_packages" { | ||
description = "The additional packages to install" | ||
// TODO: Add any other packages here you want to conditionally include, | ||
// or update this default to [] if this isn't a version stream image. | ||
default = [ | ||
"eck-operator", | ||
// Other packages your image needs | ||
] | ||
} | ||
|
||
variable "extra_repositories" { | ||
description = "The additional repositores to install from (e.g. extras)." | ||
default = ["https://packages.cgr.dev/extras"] | ||
} | ||
|
||
variable "extra_keyring" { | ||
description = "The additional keys to use (e.g. extras)." | ||
default = ["https://packages.cgr.dev/extras/chainguard-extras.rsa.pub"] | ||
} | ||
|
||
module "accts" { source = "../../../tflib/accts" } | ||
|
||
output "config" { | ||
value = jsonencode({ | ||
contents = { | ||
packages = var.extra_packages | ||
repositories = var.extra_repositories | ||
keyring = var.extra_keyring | ||
} | ||
accounts = module.accts.block | ||
entrypoint = { | ||
command = "/elastic-operator" | ||
} | ||
cmd = "manager" | ||
}) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.