Giter Club home page Giter Club logo

Comments (9)

mlacko64 avatar mlacko64 commented on June 2, 2024 1

@janegilring I am happy to hear that it help. I haven't created pull request when I was facing this issue as I was not sure if I am not doing something wrong (it was first time for me using Azure templates).

Yes, it seems that pull request should be created, if you have time to create it , I will be grateful to you. Thanks for cooperation :)

from openshift-container-platform.

haroldwongms avatar haroldwongms commented on June 2, 2024

When masterClusterType and routerClusterType are set to private, then you must also provide a domainName. In your example, it would be private.pokus.xyz. You also need to have DNS configured properly to register hosts and resolve hosts in your domain.

from openshift-container-platform.

mlacko64 avatar mlacko64 commented on June 2, 2024

Hello,
yes domain name is missing in info I have provided (because I have hardcoded it to my template and forget to paste here (sorry for that)). Anyway even with domain name and working private DNS resolver (I used native private azure DNS - currently in "tech preview" mode, but working) I was still receiving this error.

I was later able to fix it when I added following condition to some template lines. I believe issue is that when I specify private cluster , template still tries to use some resources which are but created only in case of public cluster - because of condition ""condition": "[equals(parameters('routerClusterType'), 'public')]","

so here is what I changed in azuredeploy.json :

"infraLbPublicIpDnsLabel": "[if(equals(parameters('routerClusterType'), 'public'),concat('infradns', uniqueString(concat(resourceGroup().id, 'infra'))),'no_infra_label')]",

"openshiftMasterPublicIpDnsLabel": "[if(equals(parameters('masterClusterType'), 'public'),concat('masterdns', uniqueString(concat(resourceGroup().id, 'master'))),'no_master_label')]",

"masterPublicIpAddressId": "[if(equals(parameters('masterClusterType'), 'public'),resourceId('Microsoft.Network/publicIPAddresses', variables('openshiftMasterPublicIpDnsLabel')),json('null'))]",

"infraPublicIpAddressId": "[if(equals(parameters('routerClusterType'), 'public'),resourceId('Microsoft.Network/publicIPAddresses', variables('infraLbPublicIpDnsLabel')),json('null'))]",

"nipioDomain": {
"value": "[if(equals(parameters('routerClusterType'), 'public'), concat(reference(variables('infraLbPublicIpDnsLabel')).ipAddress, '.nip.io'), '.nip.io')]"
},

"OpenshiftConsoleUrl": {
"type": "string",
"value": "[if(equals(parameters('masterClusterType'), 'public'), concat('https://', reference(variables('openshiftMasterPublicIpDnsLabel')).dnsSettings.fqdn, '/console'), concat('https://', variables('masterClusterDns'), '/console'))]"
}

from openshift-container-platform.

janegilring avatar janegilring commented on June 2, 2024

@mlacko64 Did you resolve this error? I think it is the same I just ran into in #185

from openshift-container-platform.

mlacko64 avatar mlacko64 commented on June 2, 2024

@janegilring yes, my above mentioned steps helped, seems you are facing same issue; so all you need it to fix reference on non-existing resources related to public master and router IPs and labels (because in case of private cluster they simply do not exists).

from openshift-container-platform.

janegilring avatar janegilring commented on June 2, 2024

Ah, thanks!

I went ahead and performed the changes in azuredeploy.json, however, I get this error:

Azure Error: InvalidTemplate Message: Deployment template validation failed: 'The template resource 'Microsoft.Resources/deployments/OpenShiftDeployment' reference to 'Microsoft.Network/publicIPAddresses/no_master_label' requires an API version. Please see https://aka.ms/arm-template for usage details.'.

I suppose I need to double check and see if there are additional non-existing resources.

from openshift-container-platform.

mlacko64 avatar mlacko64 commented on June 2, 2024

@janegilring
seems I forgot to mention this change:

defined variable:
"emptyString": "",

and then changed this line:

				"openshiftMasterPublicIpAddress": {
					"value": "[reference(variables('openshiftMasterPublicIpDnsLabel')).ipAddress]"

to following:

                "openshiftMasterPublicIpAddress": {
                    "value": "[if(equals(parameters('masterClusterType'), 'public'), reference(variables('openshiftMasterPublicIpDnsLabel')).ipAddress, variables('emptyString'))]"

P.S.
these lines can be fixed a bit "more nice" if you want (with null json):

    "masterPublicIpAddressId": "[if(equals(parameters('masterClusterType'), 'public'),resourceId('Microsoft.Network/publicIPAddresses', variables('openshiftMasterPublicIpDnsLabel')),json('null'))]",

    "infraPublicIpAddressId": "[if(equals(parameters('routerClusterType'), 'public'),resourceId('Microsoft.Network/publicIPAddresses', variables('infraLbPublicIpDnsLabel')),json('null'))]",

from openshift-container-platform.

janegilring avatar janegilring commented on June 2, 2024

@mlacko64 Thanks a lot, that did the trick. I suppose we should create a pull request for this. If you don't have time, I`m happy to do it and give you the credits in the PR comment.

from openshift-container-platform.

mlacko64 avatar mlacko64 commented on June 2, 2024

@janegilring I am happy to hear that it help. I haven't created pull request when I was facing this issue as I was not sure if I am not doing something wrong (it was first time for me using Azure templates).

Yes, it seems that pull request should be created, if you have time to create it , I will be grateful to you. Thanks for cooperation :)

from openshift-container-platform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.