Truecharts Linking Apps Internally - inaccurate documentation

JayG30

Contributor
Joined
Jun 26, 2013
Messages
158
Was going to submit this to Truecharts but I don't see a way to submit an issue regarding their documentation. I have a fresh TrueNAS Scale install and was trying to get the internal DNS working between Truecharts apps with no success. I was following https://truecharts.org/manual/Quick-Start Guides/06-linking-apps/. Unless I'm reading it wrong, if I'm creating a sonarr application and I name it sonarr-app-01 then the "app has different name than in the catalog" and the format should be;
$NAME-$APP.ix-$NAME.svc.cluster.local
Which would be (and the generate gives this);
sonarr-app-01-sonarr.ix-sonarr-app-01.svc.cluster.local
This does not work. I tried it over and over and over thinking I had done something wrong and was tweaking settings.
I then started tweaking the name by removing the -$APP
sonarr-app-01.ix-sonarr-app-01.svc.cluster.local
And it worked right away.

Perhaps someone from Truecharts will see this and investigate themselves.
Or perhaps it will just help others that come across this.

Code:
[truenas]> system info
+------------------------+------------------------------------------+
|                version | TrueNAS-SCALE-22.02.0                    |
|              buildtime | 2022-02-18T06:33:39+00:00                |
+------------------------+------------------------------------------+
[truenas]> system version
TrueNAS-SCALE-22.02.0
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
787
Was going to submit this to Truecharts but I don't see a way to submit an issue regarding their documentation. I have a fresh TrueNAS Scale install and was trying to get the internal DNS working between Truecharts apps with no success. I was following https://truecharts.org/manual/Quick-Start Guides/06-linking-apps/. Unless I'm reading it wrong, if I'm creating a sonarr application and I name it sonarr-app-01 then the "app has different name than in the catalog" and the format should be;

Which would be (and the generate gives this);

This does not work. I tried it over and over and over thinking I had done something wrong and was tweaking settings.
I then started tweaking the name by removing the -$APP

And it worked right away.

Perhaps someone from Truecharts will see this and investigate themselves.
Or perhaps it will just help others that come across this.

Code:
[truenas]> system info
+------------------------+------------------------------------------+
|                version | TrueNAS-SCALE-22.02.0                    |
|              buildtime | 2022-02-18T06:33:39+00:00                |
+------------------------+------------------------------------------+
[truenas]> system version
TrueNAS-SCALE-22.02.0

We indeed do not take documentation issues, as it's easier for nearly everyone to just fix the mistake inside of github and file a PR by hitting the edit button on Github. In cases where it needs more discussion we have a development channel on discord.

However, for future reference... We, generally speaking, do not work from feedback on this forum, it would mean an insanely increased workload to keep up with other fora besides our own discord/github as well.
 

JayG30

Contributor
Joined
Jun 26, 2013
Messages
158
We indeed do not take documentation issues, as it's easier for nearly everyone to just fix the mistake inside of github and file a PR by hitting the edit button on Github. In cases where it needs more discussion we have a development channel on discord.

However, for future reference... We, generally speaking, do not work from feedback on this forum, it would mean an insanely increased workload to keep up with other fora besides our own discord/github as well.
If I see anything that needs addressing from a documentation standpoint, how would you recommend submitting it to the group? Fix the doc in the github and submit via PR? Not submit a document issue/bug?

Thanks
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
787
If I see anything that needs addressing from a documentation standpoint, how would you recommend submitting it to the group? Fix the doc in the github and submit via PR? Not submit a document issue/bug?

Thanks

That's a fair question!
If you find incorrect information please feel free to just hit that edit button yourself. Worst case scenario a maintainer would edit your PR and that's it :)
In case you have a more... significant... problem... (something that requires a complete rewrite, something that is wrong but not easily rephrased etc) the discord dev-channel is generally the place to be :)
 

stavros-k

Patron
Joined
Dec 26, 2020
Messages
231
Was going to submit this to Truecharts but I don't see a way to submit an issue regarding their documentation. I have a fresh TrueNAS Scale install and was trying to get the internal DNS working between Truecharts apps with no success. I was following https://truecharts.org/manual/Quick-Start Guides/06-linking-apps/. Unless I'm reading it wrong, if I'm creating a sonarr application and I name it sonarr-app-01 then the "app has different name than in the catalog" and the format should be;

Which would be (and the generate gives this);

This does not work. I tried it over and over and over thinking I had done something wrong and was tweaking settings.
I then started tweaking the name by removing the -$APP

And it worked right away.

Perhaps someone from Truecharts will see this and investigate themselves.
Or perhaps it will just help others that come across this.

Code:
[truenas]> system info
+------------------------+------------------------------------------+
|                version | TrueNAS-SCALE-22.02.0                    |
|              buildtime | 2022-02-18T06:33:39+00:00                |
+------------------------+------------------------------------------+
[truenas]> system version
TrueNAS-SCALE-22.02.0

Keep in mind I'm in nightlies.
So, just did some tests and I get different results :O

I have installed "onlyoffice-document-server" and named it "oo".
Code:
scale# k get pods -n ix-oo
NAME                                            READY   STATUS    RESTARTS   AGE
svclb-oo-onlyoffice-document-server-tf6bm       1/1     Running   0          9d
oo-onlyoffice-document-server-f858c487c-pqqhg   1/1     Running   0          6d10h
oo-redis-0                                      1/1     Running   0          6d10h
oo-postgresql-0                                 1/1     Running   0          6d10h


From another app "shlink" in this case.

If I use "$NAME.ix-$NAME.svc.cluster.local" does NOT work.
Code:
/etc/shlink # nslookup oo.ix-oo.svc.cluster.local
Server:         172.17.0.10
Address:        172.17.0.10:53

** server can't find oo.ix-oo.svc.cluster.local: NXDOMAIN

** server can't find oo.ix-oo.svc.cluster.local: NXDOMAIN


However... If I use "$NAME-$APP.ix-$NAME.svc.cluster.local" it does work.
Code:
/etc/shlink # nslookup oo-onlyoffice-document-server.ix-oo.svc.cluster.local
Server:         172.17.0.10
Address:        172.17.0.10:53


Name:   oo-onlyoffice-document-server.ix-oo.svc.cluster.local
Address: 172.17.189.184



So, it's either something different in Release, or something else it's going on!
 

JayG30

Contributor
Joined
Jun 26, 2013
Messages
158
Keep in mind I'm in nightlies.
So, just did some tests and I get different results :O

I have installed "onlyoffice-document-server" and named it "oo".
Code:
scale# k get pods -n ix-oo
NAME                                            READY   STATUS    RESTARTS   AGE
svclb-oo-onlyoffice-document-server-tf6bm       1/1     Running   0          9d
oo-onlyoffice-document-server-f858c487c-pqqhg   1/1     Running   0          6d10h
oo-redis-0                                      1/1     Running   0          6d10h
oo-postgresql-0                                 1/1     Running   0          6d10h


From another app "shlink" in this case.

If I use "$NAME.ix-$NAME.svc.cluster.local" does NOT work.
Code:
/etc/shlink # nslookup oo.ix-oo.svc.cluster.local
Server:         172.17.0.10
Address:        172.17.0.10:53

** server can't find oo.ix-oo.svc.cluster.local: NXDOMAIN

** server can't find oo.ix-oo.svc.cluster.local: NXDOMAIN


However... If I use "$NAME-$APP.ix-$NAME.svc.cluster.local" it does work.
Code:
/etc/shlink # nslookup oo-onlyoffice-document-server.ix-oo.svc.cluster.local
Server:         172.17.0.10
Address:        172.17.0.10:53


Name:   oo-onlyoffice-document-server.ix-oo.svc.cluster.local
Address: 172.17.189.184



So, it's either something different in Release, or something else it's going on!

Perhaps it is due to version/branch. Or perhaps it has to do with the particular naming convention I used.

I used dashes, alongside the original catalog name, when naming my app. Your example you just named your app "oo" without the original catalog name or dashes. So in your example I would have named it something like "onlyoffice-app-01". Perhaps I am hitting an edge case due to the dashes? Might be an upstream bug. Or just limit the app names to not include dashes. Or perhaps an edge case related to use of the catalog name in the app name alongside other characters like perhaps the dashes.

I will try to do some further testing as time permits around day job and life.

I can't remember where I found to remove the -$APP from the DNS name, but it was some kubernetes blog or documentation that said that was the correct structure, not what was shown in the truechart documentation. And it worked. So I assumed it was a mistake in the docs.

Things seem to be changing fast with trunas scale and truecharts so I've found a number of inconsistencies in the documentation and made the logical leap that it was just incorrect documentation. For instance the video showing VPN setup shows to put the killswitch excluded IPv4 Networks as a comma separated list, but that doesn't work and the logs show it throws errors and fails. Now each network must be 1 per entry field using the Add button AND the default cluster IP address set in the kubernetes settings is automatically added to the exclude list so you don't have to define it.
 

stavros-k

Patron
Joined
Dec 26, 2020
Messages
231
So I did some more testing.

I found that if the $NAME CONTAINS the $APP, then the `-$APP` must be excluded from the equation.

So let's say an "sonarr" app named "a-sonarr-app-01"
Will respond to "a-sonarr-app-01.ix-a-sonarr-app-01.svc.cluster.local"

But an "sonarr" app named "a-sonar-app-01"
Will respond to "a-sonar.app-01-sonarr.ix-a-sonar-app-01.svc.cluster.local"

I'm gonna have to update the generator and docs slightly.

This was a nice find!
Thanks
 

JayG30

Contributor
Joined
Jun 26, 2013
Messages
158
So I did some more testing.

I found that if the $NAME CONTAINS the $APP, then the `-$APP` must be excluded from the equation.

So let's say an "sonarr" app named "a-sonarr-app-01"
Will respond to "a-sonarr-app-01.ix-a-sonarr-app-01.svc.cluster.local"

But an "sonarr" app named "a-sonar-app-01"
Will respond to "a-sonar.app-01-sonarr.ix-a-sonar-app-01.svc.cluster.local"

I'm gonna have to update the generator and docs slightly.

This was a nice find!
Thanks
Aha! I knew there was something going on either with the - or the app name. Nice!
 

marshalleq

Explorer
Joined
Mar 12, 2016
Messages
82
I have been trying to find this elusive generator but the link seems dead - anyone know where it is?

Thanks.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
I have been trying to find this elusive generator but the link seems dead - anyone know where it is?

Thanks.
Use Heavyscript to list them instead. See:
 

marshalleq

Explorer
Joined
Mar 12, 2016
Messages
82
Thanks got it, then I discover cause the one app I need this for is a custom app it doesn't work for that. LOL.
 
Top