Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
pkg/platform: introduce PostApplyHook interface
Browse files Browse the repository at this point in the history
To address issue with AKS having delayed creation of default
StorageClass, which affects installing components which depend on the
storage, this commit introduces PlatformPostApplyHook interface
interface, which platforms will be able to implement to obtain
kubeconfig file content after cluster is installed to run their own
sanity checks. In case of AKS, hook will be looping an waiting until the
default storage class appears on the cluster.

Refs #855

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
  • Loading branch information
invidian committed Sep 1, 2020
1 parent d41aa0c commit 0949abe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/platform/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ type Platform interface {
Meta() Meta
}

// PostApplyHook is an interface, which platforms may optionally implement. If they do so,
// after Terraform finishes applying, kubeconfig content will be passed to this function and
// executed. This allows running sanity checks on the newly created cluster.
type PostApplyHook interface {
PostApplyHook(kubeconfig []byte) error
}

// Meta is a generic information format about the platform.
type Meta struct {
AssetDir string
Expand Down

0 comments on commit 0949abe

Please sign in to comment.