Skip to content

Commit

Permalink
chore: Use safe example domains defined in RFC 2606 (argoproj#16389)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkilchhofer authored and Hariharasuthan99 committed Jun 16, 2024
1 parent c13efca commit cc7c9da
Show file tree
Hide file tree
Showing 31 changed files with 97 additions and 97 deletions.
4 changes: 2 additions & 2 deletions applicationset/services/pull_request/azure_devops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ func TestBuildURL(t *testing.T) {
},
{
name: "Provided custom URL and organization",
url: "https://azuredevops.mycompany.com/",
url: "https://azuredevops.example.com/",
organization: "myorganization",
expected: "https://azuredevops.mycompany.com/myorganization",
expected: "https://azuredevops.example.com/myorganization",
},
}

Expand Down
36 changes: 18 additions & 18 deletions controller/cache/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var (
resourceVersion: "123"
uid: "4"
annotations:
link.argocd.argoproj.io/external-link: http://my-grafana.com/pre-generated-link
link.argocd.argoproj.io/external-link: http://my-grafana.example.com/pre-generated-link
spec:
selector:
app: guestbook
Expand All @@ -74,7 +74,7 @@ var (
serviceName: not-found-service
servicePort: 443
rules:
- host: helm-guestbook.com
- host: helm-guestbook.example.com
http:
paths:
- backend:
Expand All @@ -86,7 +86,7 @@ var (
servicePort: https
path: /
tls:
- host: helm-guestbook.com
- host: helm-guestbook.example.com
secretName: my-tls-secret
status:
loadBalancer:
Expand All @@ -101,13 +101,13 @@ var (
namespace: default
uid: "4"
annotations:
link.argocd.argoproj.io/external-link: http://my-grafana.com/ingress-link
link.argocd.argoproj.io/external-link: http://my-grafana.example.com/ingress-link
spec:
backend:
serviceName: not-found-service
servicePort: 443
rules:
- host: helm-guestbook.com
- host: helm-guestbook.example.com
http:
paths:
- backend:
Expand All @@ -119,7 +119,7 @@ var (
servicePort: https
path: /
tls:
- host: helm-guestbook.com
- host: helm-guestbook.example.com
secretName: my-tls-secret
status:
loadBalancer:
Expand All @@ -138,7 +138,7 @@ var (
serviceName: not-found-service
servicePort: 443
rules:
- host: helm-guestbook.com
- host: helm-guestbook.example.com
http:
paths:
- backend:
Expand All @@ -150,7 +150,7 @@ var (
servicePort: https
path: /*
tls:
- host: helm-guestbook.com
- host: helm-guestbook.example.com
secretName: my-tls-secret
status:
loadBalancer:
Expand All @@ -169,7 +169,7 @@ var (
serviceName: not-found-service
servicePort: 443
rules:
- host: helm-guestbook.com
- host: helm-guestbook.example.com
http:
paths:
- backend:
Expand Down Expand Up @@ -199,7 +199,7 @@ var (
port:
number: 443
rules:
- host: helm-guestbook.com
- host: helm-guestbook.example.com
http:
paths:
- backend:
Expand All @@ -215,7 +215,7 @@ var (
name: https
path: /
tls:
- host: helm-guestbook.com
- host: helm-guestbook.example.com
secretName: my-tls-secret
status:
loadBalancer:
Expand Down Expand Up @@ -327,7 +327,7 @@ func TestGetLinkAnnotatedServiceInfo(t *testing.T) {
assert.Equal(t, &v1alpha1.ResourceNetworkingInfo{
TargetLabels: map[string]string{"app": "guestbook"},
Ingress: []v1.LoadBalancerIngress{{Hostname: "localhost"}},
ExternalURLs: []string{"http://my-grafana.com/pre-generated-link"},
ExternalURLs: []string{"http://my-grafana.example.com/pre-generated-link"},
}, info.NetworkingInfo)
}

Expand Down Expand Up @@ -381,7 +381,7 @@ func TestGetIngressInfo(t *testing.T) {
Kind: kube.ServiceKind,
Name: "helm-guestbook",
}},
ExternalURLs: []string{"https://helm-guestbook.com/"},
ExternalURLs: []string{"https://helm-guestbook.example.com/"},
}, info.NetworkingInfo)
}
}
Expand All @@ -406,7 +406,7 @@ func TestGetLinkAnnotatedIngressInfo(t *testing.T) {
Kind: kube.ServiceKind,
Name: "helm-guestbook",
}},
ExternalURLs: []string{"http://my-grafana.com/ingress-link", "https://helm-guestbook.com/"},
ExternalURLs: []string{"http://my-grafana.example.com/ingress-link", "https://helm-guestbook.example.com/"},
}, info.NetworkingInfo)
}

Expand All @@ -430,7 +430,7 @@ func TestGetIngressInfoWildCardPath(t *testing.T) {
Kind: kube.ServiceKind,
Name: "helm-guestbook",
}},
ExternalURLs: []string{"https://helm-guestbook.com/"},
ExternalURLs: []string{"https://helm-guestbook.example.com/"},
}, info.NetworkingInfo)
}

Expand All @@ -454,7 +454,7 @@ func TestGetIngressInfoWithoutTls(t *testing.T) {
Kind: kube.ServiceKind,
Name: "helm-guestbook",
}},
ExternalURLs: []string{"http://helm-guestbook.com/"},
ExternalURLs: []string{"http://helm-guestbook.example.com/"},
}, info.NetworkingInfo)
}

Expand Down Expand Up @@ -563,7 +563,7 @@ func TestExternalUrlWithMultipleSubPaths(t *testing.T) {
namespace: default
spec:
rules:
- host: helm-guestbook.com
- host: helm-guestbook.example.com
http:
paths:
- backend:
Expand All @@ -587,7 +587,7 @@ func TestExternalUrlWithMultipleSubPaths(t *testing.T) {
info := &ResourceInfo{}
populateNodeInfo(ingress, info, []string{})

expectedExternalUrls := []string{"https://helm-guestbook.com/my/sub/path/", "https://helm-guestbook.com/my/sub/path/2", "https://helm-guestbook.com"}
expectedExternalUrls := []string{"https://helm-guestbook.example.com/my/sub/path/", "https://helm-guestbook.example.com/my/sub/path/2", "https://helm-guestbook.example.com"}
actualURLs := info.NetworkingInfo.ExternalURLs
sort.Strings(expectedExternalUrls)
sort.Strings(actualURLs)
Expand Down
2 changes: 1 addition & 1 deletion docs/operator-manual/custom-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ metadata:
...
name: argocd-cm
data:
ui.cssurl: "https://www.myhost.com/my-styles.css"
ui.cssurl: "https://www.example.com/my-styles.css"
```
## Adding Styles Via Volume Mounts
Expand Down
20 changes: 10 additions & 10 deletions docs/operator-manual/declarative-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ metadata:
argocd.argoproj.io/secret-type: cluster
type: Opaque
stringData:
name: mycluster.com
server: https://mycluster.com
name: mycluster.example.com
server: https://mycluster.example.com
config: |
{
"bearerToken": "<authentication token>",
Expand All @@ -615,8 +615,8 @@ metadata:
argocd.argoproj.io/secret-type: cluster
type: Opaque
stringData:
name: "mycluster.com"
server: "https://mycluster.com"
name: "mycluster.example.com"
server: "https://mycluster.example.com"
config: |
{
"awsAuthConfig": {
Expand Down Expand Up @@ -742,8 +742,8 @@ metadata:
argocd.argoproj.io/secret-type: cluster
type: Opaque
stringData:
name: mycluster.com
server: https://mycluster.com
name: mycluster.example.com
server: https://mycluster.example.com
config: |
{
"execProviderConfig": {
Expand Down Expand Up @@ -795,8 +795,8 @@ metadata:
argocd.argoproj.io/secret-type: cluster
type: Opaque
stringData:
name: mycluster.com
server: https://mycluster.com
name: mycluster.example.com
server: https://mycluster.example.com
config: |
{
"execProviderConfig": {
Expand Down Expand Up @@ -830,8 +830,8 @@ metadata:
argocd.argoproj.io/secret-type: cluster
type: Opaque
stringData:
name: mycluster.com
server: https://mycluster.com
name: mycluster.example.com
server: https://mycluster.example.com
config: |
{
"execProviderConfig": {
Expand Down
4 changes: 2 additions & 2 deletions docs/operator-manual/high_availability.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ metadata:
type: Opaque
stringData:
shard: 1
name: mycluster.com
server: https://mycluster.com
name: mycluster.example.com
server: https://mycluster.example.com
config: |
{
"bearerToken": "<authentication token>",
Expand Down
10 changes: 5 additions & 5 deletions docs/operator-manual/ingress.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,9 @@ metadata:
networking.gke.io/v1beta1.FrontendConfig: argocd-frontend-config
spec:
tls:
- secretName: secret-yourdomain-com
- secretName: secret-example-com
rules:
- host: argocd.yourdomain.com
- host: argocd.example.com
http:
paths:
- pathType: ImplementationSpecific
Expand All @@ -686,9 +686,9 @@ metadata:
networking.gke.io/v1beta1.FrontendConfig: argocd-frontend-config
spec:
tls:
- secretName: secret-yourdomain-com
- secretName: secret-example-com
rules:
- host: argocd.yourdomain.com
- host: argocd.example.com
http:
paths:
- pathType: Prefix
Expand All @@ -700,7 +700,7 @@ spec:
number: 80
```

As you may know already, it can take some minutes to deploy the load balancer and become ready to accept connections. Once it's ready, get the public IP address for your Load Balancer, go to your DNS server (Google or third party) and point your domain or subdomain (i.e. argocd.yourdomain.com) to that IP address.
As you may know already, it can take some minutes to deploy the load balancer and become ready to accept connections. Once it's ready, get the public IP address for your Load Balancer, go to your DNS server (Google or third party) and point your domain or subdomain (i.e. argocd.example.com) to that IP address.

You can get that IP address describing the Ingress object like this:

Expand Down
14 changes: 7 additions & 7 deletions docs/operator-manual/user-management/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ data:
id: acme-github
name: Acme GitHub
config:
hostName: github.acme.com
hostName: github.acme.example.com
clientID: abcdefghijklmnopqrst
clientSecret: $dex.acme.clientSecret # Alternatively $<some_K8S_secret>:dex.acme.clientSecret
orgs:
Expand Down Expand Up @@ -242,7 +242,7 @@ data:
id: oidc
name: OIDC
config:
issuer: https://example-OIDC-provider.com
issuer: https://example-OIDC-provider.example.com
clientID: aaaabbbbccccddddeee
clientSecret: $dex.oidc.clientSecret
```
Expand All @@ -264,7 +264,7 @@ data:
id: oidc
name: OIDC
config:
issuer: https://example-OIDC-provider.com
issuer: https://example-OIDC-provider.example.com
clientID: aaaabbbbccccddddeee
clientSecret: $dex.oidc.clientSecret
insecureEnableGroups: true
Expand Down Expand Up @@ -294,7 +294,7 @@ data:
id: oidc
name: OIDC
config:
issuer: https://example-OIDC-provider.com
issuer: https://example-OIDC-provider.example.com
clientID: aaaabbbbccccddddeee
clientSecret: $dex.oidc.clientSecret
insecureEnableGroups: true
Expand Down Expand Up @@ -395,18 +395,18 @@ any active session post logout, you can do so by specifying it as follows:
```yaml
oidc.config: |
name: example-OIDC-provider
issuer: https://example-OIDC-provider.com
issuer: https://example-OIDC-provider.example.com
clientID: xxxxxxxxx
clientSecret: xxxxxxxxx
requestedScopes: ["openid", "profile", "email", "groups"]
requestedIDTokenClaims: {"groups": {"essential": true}}
logoutURL: https://example-OIDC-provider.com/logout?id_token_hint={{token}}
logoutURL: https://example-OIDC-provider.example.com/logout?id_token_hint={{token}}
```
By default, this would take the user to their OIDC provider's login page after logout. If you also wish to redirect the user back to Argo CD after logout, you can specify the logout URL as follows:

```yaml
...
logoutURL: https://example-OIDC-provider.com/logout?id_token_hint={{token}}&post_logout_redirect_uri={{logoutRedirectURL}}
logoutURL: https://example-OIDC-provider.example.com/logout?id_token_hint={{token}}&post_logout_redirect_uri={{logoutRedirectURL}}
```

You are not required to specify a logoutRedirectURL as this is automatically generated by ArgoCD as your base ArgoCD url + Rootpath
Expand Down
Loading

0 comments on commit cc7c9da

Please sign in to comment.