Skip to content

Conversation

@guzzijones
Copy link
Contributor

allow alternate proxy registry to be used with helm chart.
fix replica set timeout error
fix dns resolution errors for mongo and redis

@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines. Good size to review. label Feb 1, 2023
@CLAassistant
Copy link

CLAassistant commented Feb 1, 2023

CLA assistant check
All committers have signed the CLA.

@guzzijones
Copy link
Contributor Author

Not sure why the key is missing for the checks

update

fix default registry

fix whitespace
@guzzijones guzzijones linked an issue Feb 1, 2023 that may be closed by this pull request
Copy link
Member

@cognifloyd cognifloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would break my setup, as, in my values:

  • I include my private image registry in the name of all the images.
  • I include dnsConfig.searches with the cluster namespace so that searches for the short name always resolve.

#pullSecret: "your-pull-secret"


clusterDomain: cluster.local
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs some kind of doc string.

The clusterDomain is defined here: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/#kubelet-config-k8s-io-v1beta1-KubeletConfiguration
And the DNS server has to be configured with it as well:
https://stackoverflow.com/a/52941407/1134951

Looks like kube-dns is the thing that defaults to cluster.local (overridable with the --domain param): https://github.com/kubernetes/dns/blob/master/cmd/kube-dns/app/options/options.go#L59

I use coredns where there is not a default domain, and I did not use the cluster.local domain shown in the docs: https://coredns.io/plugins/kubernetes/

How is your cluster's dns configured?

Copy link
Contributor Author

@guzzijones guzzijones Feb 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use coredns.
My configmap:

.:53 {
    errors
    health
    kubernetes cluster.local in-addr.arpa ip6.arpa {
      pods insecure
      fallthrough in-addr.arpa ip6.arpa
    }
    prometheus :9153
    forward . /etc/resolv.conf
    cache 30
    loop
    reload
    loadbalance
}

Copy link
Contributor Author

@guzzijones guzzijones Feb 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my /etc/resolv.conf on the st2-api pod

search default.svc.cluster.local svc.cluster.local cluster.local [redacted]
nameserver 10.100.0.10 
nameserver [redacted]
options ndots:5                                         

Copy link
Contributor Author

@guzzijones guzzijones Feb 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on the node my kubelet-config.json does have a line for:

{
...
    clusterDomain": "cluster.local",
...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment here as well.

@cognifloyd cognifloyd changed the title Alternate registry configurable utilityImage + clusterDomain and increase default db timeouts to avoid replicaset timeout Feb 4, 2023
@cognifloyd cognifloyd enabled auto-merge February 10, 2023 06:03
Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment for the DB settings

remove hardcoded settings for retry to allow k8 to handle restarting.
Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +84 to +87
# fixes no replicaset found bug;
[database]
# Connection and server selection timeout (in ms).
connection_timeout = 5000
Copy link
Member

@arm4b arm4b Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM. With 3s being default in st2, bumping it to 5s for K8s sounds like an improvement for distributed environment.

@cognifloyd cognifloyd merged commit 53f700e into StackStorm:master Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M PR that changes 30-99 lines. Good size to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

st2api pod cannot connect to mongo service

4 participants