Skip to content

Commit

Permalink
chore: fixed versions dropdown ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding committed Jul 29, 2024
1 parent 2ffdf69 commit d84a5a4
Show file tree
Hide file tree
Showing 11 changed files with 375 additions and 368 deletions.
161 changes: 54 additions & 107 deletions docs/docs-content/integrations/external-dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,18 @@ type: "integration"
hide_table_of_contents: true
category: ["load balancers", "amd64"]
sidebar_class_name: "hide-from-sidebar"
logoUrl: "https://registry.spectrocloud.com/v1/external-dns/blobs/sha256:1bfd6dceb0b50efee4068cd6321511f6b24be86e2d613e0a8206e716ba7aea3f?type=image.webp"
tags: ["packs", "external-dns", "network"]
---

The integration helps configure public DNS servers with information about Kubernetes services to make them discoverable.

## Prerequisites

Providers have to be set up for this pack to get deployed and work seamlessly. For a list of supported providers and the
prerequisites to be set up, visit [providers](https://github.com/kubernetes-sigs/external-dns#status-of-providers)
section

## Versions Supported

<Tabs>
<Tabs queryString="parent">

<TabItem label="0.12.x" value="0.12.x">

- **0.13.1**
- **0.12.2**

</TabItem>
<TabItem label="0.7.x" value="0.7.x">

- **0.7.2**

</TabItem>

</Tabs>

## Components

Integration deploys the following components:

- External DNS

## ExternalDNS for Services on AWS Route53 Example
### AWS Route53

### Setup prerequisites for AWS Route53

- Create the following IAM policy in the AWS account. This is needed for externalDNS to list and create Route53
resources.
To use ExternalDNS with AWS Route53, you need to create an IAM policy and role with the following permissions.

```json
{
Expand All @@ -67,100 +37,77 @@ Integration deploys the following components:
}
```

You also need to meet the following prerequisites:

- Create an IAM role and associate the policy created above. Make a note of the role ARN which will be used in
ExternalDNS deployment later
- Setup hosted zone in AWS Route53

- Setup hosted zone in AWS Route53. Use the following command to create a hosted zone in Route53 using the AWS CLI.

```bash
# Create a DNS zone through AWS CLI
aws route53 create-hosted-zone --name "external-dns-test.my-org.com." --caller-reference "external-dns-test-$(date +%s)"
```

### Deploy ExternalDNS on the cluster

- Add ExternalDNS pack to the desired profile and deploy it to the cluster. You may want to configure the following in
pack values.yaml

- Configure AWS provider details (line #86)

- Credentials, Zone Type
- AssumeRoleArn with the Role ARN created above

- Configure txtOwnerId with the ID of the hosted zone created above (line #366)
```bash
aws route53 list-hosted-zones-by-name --output json --dns-name "external-dns-test.my-org.com." | jq -r '.HostedZones[0].Id'
```
- Optionally change externalDNS policy and logLevel

### Deploy Ingress Controller on the cluster

- Deploy one of the Ingress Controller on the cluster

### Deploy Applications with Ingress on the cluster

- Add Prometheus-Operator addon to the same profile where ExternalDNS is added

- Change serviceType to ClusterIP (line #408)
- Enable Ingress for the add-on packs. In this example, let us use Prometheus-Operator integration. Ingress config for
Grafana will look like the following:

```yaml
#Ingress config
ingress:
## If true, Grafana Ingress will be created
##
enabled: true
</TabItem>
<TabItem label="0.7.x" value="0.7.x">

hosts:
- grafana.external-dns-test.my-org.com
### AWS Route53

## Path for grafana ingress
path: /
```
To use ExternalDNS with AWS Route53, you need to create an IAM policy and role with the following permissions.

When Prometheus-Operator gets deployed in the Cluster, Ingress resource for Grafana will also get created and will
look like
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["route53:ChangeResourceRecordSets"],
"Resource": ["arn:aws:route53:::hostedzone/*"]
},
{
"Effect": "Allow",
"Action": ["route53:ListHostedZones", "route53:ListResourceRecordSets"],
"Resource": ["*"]
}
]
}
```

```yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: grafana-ingress
namespace: monitoring
spec:
rules:
- host: grafana.external-dns-test.my-org.com
http:
paths:
- backend:
serviceName: grafana
servicePort: 80
path: /
status:
loadBalancer:
ingress:
- hostname: a9a2eadb64c8e4c2fb37a1f69afb0a30-330939473.us-west-2.elb.amazonaws.com
```
You also need to meet the following prerequisites:

### Verify ExternalDNS (Ingress example)
- Create an IAM role and associate the policy created above. Make a note of the role ARN which will be used in
ExternalDNS deployment later

- If all goes well, after 2 minutes, ExternalDNS would have inserted 2 records on your hosted zone
- Setup hosted zone in AWS Route53. Use the following command to create a hosted zone in Route53 using the AWS CLI.

```bash
aws route53 list-resource-record-sets --output json --hosted-zone-id "/hostedzone/ZEWFWZ4R16P7IB" \
--query "ResourceRecordSets[?Name == 'grafana.external-dns-test.my-org.com.']|[?Type == 'A']"
aws route53 create-hosted-zone --name "external-dns-test.my-org.com." --caller-reference "external-dns-test-$(date +%s)"
```

- After which, if you access http://grafana.external-dns-test.my-org.com on your browser, you will be able to view the
Grafana login page
</TabItem>

</Tabs>

### Troubleshooting

- Make sure Ingress resource gets created for the Applications deployed and a LoadBalancer hostname / IP address is set
on the Ingress resource
- Make sure an _Ingress_ resource gets created for the applications deployed and a _LoadBalancer_ hostname or IP address
is set on the Ingress resource

- Check the `external-dns` pod for any issues with ExternalDNS not inserting records. If required, change `logLevel` to
debug to see additional info on the logs

## References
## Terraform

- [External DNS Home](https://github.com/kubernetes-sigs/external-dns)
- [External DNS Helm Chart](https://github.com/bitnami/charts/tree/master/bitnami/external-dns)
You can reference the External DNS pack in Terraform with the following data resource.

```hcl
data "spectrocloud_registry" "palette_registry" {
name = "Palette Registry"
}
data "spectrocloud_pack" "external-dns" {
name = "external-dns"
version = "0.13.6
registry_uid = data.spectrocloud_registry.palette_registry.id
}
```
135 changes: 110 additions & 25 deletions docs/docs-content/integrations/external-secrets-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,116 @@ logoUrl: "https://registry.spectrocloud.com/v1/external-secrets-operator/blobs/s
tags: ["packs", "external-secrets-operator", "security"]
---

External Secrets Operator (ESO) is a Kubernetes operator that integrates external secret management systems like AWS
Secrets Manager, HashiCorp Vault, Google Secrets Manager, or Azure Key Vault. The operator reads information from
external APIs and automatically injects the values into a Kubernetes Secret.
## Versions Supported

You can use the External-Secrets-Operator Add-on pack as an authenticator in Palette.
<Tabs queryString="parent">
<TabItem label="0.9.x" value="0.9.x">

:::info
#### Example Configuration

Starting from Palette version 3.1, Palette no longer supports upgrades to Kubernetes External Secrets since this is
reaching end of life. Migrate or switch to using External Secrets operator instead.
```yml
apiVersion: [external-secrets.io/v1beta1](http://external-secrets.io/v1beta1)
kind: ExternalSecret
metadata:
name: vault-example # Custom name
spec:
refreshInterval: "15s"
secretStoreRef:
name: vault-backend # Custom value
kind: SecretStore
target:
name: mysecretfoobar
data:
- secretKey: foobar
remoteRef:
key: secret/foo # custom value
property: my-value # custom value

:::
```

## Versions Supported
```yml
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: custom-name
spec:
provider:
vault:
server: "http://12.34.567.133:0000" # custom server end point
path: "secret" # custom path
version: "v2" # custom version
auth:
# points to a secret that contains a vault token
# https://www.vaultproject.io/docs/auth/token
tokenSecretRef:
name: "vault-token1" # Custom name and key
key: "token1"
---
apiVersion: v1
kind: Secret
metadata:
name: vault-token1
data:
token: cm9vdA== # "root" # custome value
```
<Tabs>
</TabItem>
<TabItem label="0.6.x" value="0.6.x">
- **0.7.1**
- **0.6.0**
#### Example Configuration
</TabItem>
```yml
apiVersion: [external-secrets.io/v1beta1](http://external-secrets.io/v1beta1)
kind: ExternalSecret
metadata:
name: vault-example # Custom name
spec:
refreshInterval: "15s"
secretStoreRef:
name: vault-backend # Custom value
kind: SecretStore
target:
name: mysecretfoobar
data:
- secretKey: foobar
remoteRef:
key: secret/foo # custom value
property: my-value # custom value

<TabItem label="0.5.x" value="0.5.x">
```

- **0.5.6**
```yml
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: custom-name
spec:
provider:
vault:
server: "http://12.34.567.133:0000" # custom server end point
path: "secret" # custom path
version: "v2" # custom version
auth:
# points to a secret that contains a vault token
# https://www.vaultproject.io/docs/auth/token
tokenSecretRef:
name: "vault-token1" # Custom name and key
key: "token1"
---
apiVersion: v1
kind: Secret
metadata:
name: vault-token1
data:
token: cm9vdA== # "root" # custome value
```
</TabItem>
</Tabs>
### Sample SecretStore
<TabItem label="0.5.x" value="0.5.x">
<br />
#### Example Configuration
```yml
apiVersion: [external-secrets.io/v1beta1](http://external-secrets.io/v1beta1)
Expand All @@ -65,10 +141,6 @@ spec:

```

### Sample ExternalSecret YAML file

<br />

```yml
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
Expand All @@ -95,8 +167,21 @@ data:
token: cm9vdA== # "root" # custome value
```
## References
</TabItem>
</Tabs>
## Terraform
You can reference the External Secrets Operator pack in Terraform with the following data resource.
- [Amazon IAM-Policy-Examples-ASM-Secrets](https://docs.aws.amazon.com/mediaconnect/latest/ug/iam-policy-examples-asm-secrets.html)
```hcl
data "spectrocloud_registry" "palette_registry" {
name = "Palette Registry"
}

- [External Secrets](https://github.com/external-secrets/external-secrets)
data "spectrocloud_pack" "external-secrets-operator" {
name = "external-secrets-operator"
version = "0.9.16"
registry_uid = data.spectrocloud_registry.palette_registry.id
}
```
Loading

0 comments on commit d84a5a4

Please sign in to comment.