mirror of https://github.com/linkerd/linkerd2.git
fix(CLI): Print specific command when prompting to install the Gateway API
If the user runs `linkerd install --crds` when the Gateway API CRDs are not already present on the cluster, Linkerd will print an error prompting the user to first install the gateway API. To make this a more streamlined user experience, we update the message to include a specific command for installing the Gateway API instead of merely linking to the Gateway API documentation. ```console > linkerd install --crds The Gateway API CRDs must be installed prior to installing Linkerd. Run: kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml or see https://gateway-api.sigs.k8s.io/guides/#installing-gateway-api for more options. ``` Signed-off-by: Alex Leong <alex@buoyant.io>
This commit is contained in:
parent
7edd886c91
commit
b4bffda34b
|
|
@ -394,7 +394,11 @@ func validateFinalValues(installed GatewayAPICRDs, finalValues map[string]interf
|
|||
if installed == Absent {
|
||||
if !installing {
|
||||
// if we are not installing GW API Resources and they are not present, error
|
||||
return errors.New("The Gateway API CRDs must be installed prior to installing Linkerd: https://gateway-api.sigs.k8s.io/guides/#installing-gateway-api")
|
||||
return errors.New(`The Gateway API CRDs must be installed prior to installing Linkerd. Run:
|
||||
|
||||
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml
|
||||
|
||||
or see https://gateway-api.sigs.k8s.io/guides/#installing-gateway-api for more options.`)
|
||||
}
|
||||
} else if installed == Linkerd {
|
||||
if !installing {
|
||||
|
|
|
|||
Loading…
Reference in New Issue