Skip to content

Commit

Permalink
Merge branch 'master' into fix/max-cookie-number-default
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsoumya authored Nov 20, 2023
2 parents 91cab0f + 841339d commit 11c7890
Show file tree
Hide file tree
Showing 35 changed files with 126 additions and 99 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
10 changes: 9 additions & 1 deletion applicationset/services/scm_provider/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,20 @@ func (g *GitlabProvider) ListRepos(ctx context.Context, cloneProtocol string) ([
return nil, fmt.Errorf("unknown clone protocol for Gitlab %v", cloneProtocol)
}

var repoLabels []string
if len(gitlabRepo.Topics) == 0 {
// fallback to for gitlab prior to 14.5
repoLabels = gitlabRepo.TagList
} else {
repoLabels = gitlabRepo.Topics
}

repos = append(repos, &Repository{
Organization: gitlabRepo.Namespace.FullPath,
Repository: gitlabRepo.Path,
URL: url,
Branch: gitlabRepo.DefaultBranch,
Labels: gitlabRepo.TagList,
Labels: repoLabels,
RepositoryId: gitlabRepo.ID,
})
}
Expand Down
10 changes: 10 additions & 0 deletions applicationset/services/scm_provider/gitlab_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,16 @@ func TestGitlabListRepos(t *testing.T) {
proto: "ssh",
url: "[email protected]:test-argocd-proton/argocd.git",
},
{
name: "labelmatch",
proto: "ssh",
url: "[email protected]:test-argocd-proton/argocd.git",
filters: []v1alpha1.SCMProviderGeneratorFilter{
{
LabelMatch: strp("test-topic"),
},
},
},
{
name: "https protocol",
proto: "https",
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
9 changes: 9 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ which might cause health check to return `Progressing` state instead of `Healthy
As workaround Argo CD allows providing [health check](operator-manual/health.md) customization which overrides default
behavior.

If you are using Traefik for your Ingress, you can update the Traefik config to publish the loadBalancer IP using [publishedservice](https://doc.traefik.io/traefik/providers/kubernetes-ingress/#publishedservice), which will resolve this issue.

```yaml
providers:
kubernetesIngress:
publishedService:
enabled: true
```
## I forgot the admin password, how do I reset it?
For Argo CD v1.8 and earlier, the initial password is set to the name of the server pod, as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ spec:
* `tokenRef`: A `Secret` name and key containing the GitLab access token to use for requests. If not specified, will make anonymous requests which have a lower rate limit and can only see public repositories.
* `insecure`: By default (false) - Skip checking the validity of the SCM's certificate - useful for self-signed TLS certificates.

For label filtering, the repository tags are used.
For label filtering, the repository topics are used.

Available clone protocols are `ssh` and `https`.

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
Loading

0 comments on commit 11c7890

Please sign in to comment.