Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle error case for invalid GitHub token or unable to fetch provider repository #128

Closed
dtzar opened this issue Jun 1, 2023 · 2 comments · Fixed by #135
Closed

Handle error case for invalid GitHub token or unable to fetch provider repository #128

dtzar opened this issue Jun 1, 2023 · 2 comments · Fixed by #135
Assignees
Labels
area/provider/azure Issues or PRs related to azure provider kind/bug Categorizes issue or PR as related to a bug.

Comments

@dtzar
Copy link

dtzar commented Jun 1, 2023

What steps did you take and what happened:
Followed the instructions at the getting started guide and the Azure infrastructure provider was not installed and there is no error/warning messages of what went wrong.

Specifically, I did the following steps:

helm repo add jetstack https://charts.jetstack.io
helm repo udpate
helm install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.12.1 \
  --set installCRDs=true
helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator
helm repo update
helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system
k create ns capi-system
k apply -f ./capi.yaml
k create ns capz-system
k apply -f ./capz.yaml
apiVersion: operator.cluster.x-k8s.io/v1alpha1
kind: CoreProvider
metadata:
  name: cluster-api
  namespace: capi-system
spec:
  version: v1.4.2
---
apiVersion: v1
kind: Secret
metadata:
  name: azure-variables
  namespace: capz-system
type: Opaque
stringData:
  AZURE_CLIENT_ID_B64: M#
  AZURE_CLIENT_SECRET_B64: W#
  AZURE_SUBSCRIPTION_ID_B64: M#
  AZURE_TENANT_ID_B64: O#
  github-token: Z#
---
apiVersion: operator.cluster.x-k8s.io/v1alpha1
kind: InfrastructureProvider
metadata:
 name: azure
 namespace: capz-system
spec:
 version: v1.9.2
 secretName: azure-variables

What did you expect to happen:
The CAPZ infrastructure provider was installed.

Anything else you would like to add:
The k apply -f capz.yaml succeded.

secret/azure-variables created
infrastructureprovider.operator.cluster.x-k8s.io/azure created

The capi-operator-controller-manager pod logs also appears to only have "success" listed.

I0601 17:54:11.609633       1 genericprovider_controller.go:56]  "msg"="Reconciling provider" "InfrastructureProvider"={"name":"azure","namespace":"capz-system"} "controller"="infrastructureprovider" "controllerGroup"="operator.cluster.x-k8s.io" "controllerKind"="InfrastructureProvider" "name"="azure" "namespace"="capz-system" "reconcileID"="b975804e-6e58-4618-9304-47030b5593c2"
I0601 17:54:11.697207       1 genericprovider_controller.go:56]  "msg"="Reconciling provider" "InfrastructureProvider"={"name":"azure","namespace":"capz-system"} "controller"="infrastructureprovider" "controllerGroup"="operator.cluster.x-k8s.io" "controllerKind"="InfrastructureProvider" "name"="azure" "namespace"="capz-system" "reconcileID"="e73ed648-5f89-4b68-ab63-6dd7055707f1"
I0601 17:54:11.697355       1 preflight_checks.go:51]  "msg"="Performing preflight checks" "InfrastructureProvider"={"name":"azure","namespace":"capz-system"} "controller"="infrastructureprovider" "controllerGroup"="operator.cluster.x-k8s.io" "controllerKind"="InfrastructureProvider" "name"="azure" "namespace"="capz-system" "reconcileID"="e73ed648-5f89-4b68-ab63-6dd7055707f1"
I0601 17:54:11.697485       1 preflight_checks.go:153]  "msg"="Preflight checks passed" "InfrastructureProvider"={"name":"azure","namespace":"capz-system"} "controller"="infrastructureprovider" "controllerGroup"="operator.cluster.x-k8s.io" "controllerKind"="InfrastructureProvider" "name"="azure" "namespace"="capz-system" "reconcileID"="e73ed648-5f89-4b68-ab63-6dd7055707f1"
I0601 17:54:11.697525       1 phases.go:115]  "msg"="Loading provider" "InfrastructureProvider"={"name":"azure","namespace":"capz-system"} "controller"="infrastructureprovider" "controllerGroup"="operator.cluster.x-k8s.io" "controllerKind"="InfrastructureProvider" "name"="azure" "namespace"="capz-system" "reconcileID"="e73ed648-5f89-4b68-ab63-6dd7055707f1"

Environment:

  • Cluster-api-operator version: 0.2.0
  • Cluster-api version: 1.4.2
  • Minikube/KIND version: Kind 0.19.0
  • Kubernetes version: (use kubectl version): 1.27.1
  • OS (e.g. from /etc/os-release): Debian GNU/Linux 11 (bullseye)

/kind bug
/area provider/azure

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/provider/azure Issues or PRs related to azure provider labels Jun 1, 2023
@dtzar
Copy link
Author

dtzar commented Jun 1, 2023

I deleted the github token secret and then the provider installed. This said, there should be some error message, log, or something letting people know the controller can't access GitHub to install the provider.

@dtzar dtzar changed the title Azure provider does not install Handle error case for invalid GitHub token or unable to fetch provider repository Jun 1, 2023
@alexander-demicev
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/azure Issues or PRs related to azure provider kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants