Skip to content

Commit

Permalink
Remove prometheus-adapter temporary. (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
stafot authored Jan 13, 2021
1 parent 7856bc0 commit ca36e01
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 336 deletions.
17 changes: 0 additions & 17 deletions internal/provisioner/kops_provisioner_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,20 +293,6 @@ func (provisioner *KopsProvisioner) ProvisionCluster(cluster *model.Cluster, aws
return errors.Wrap(err, "failed to delete APIService v1beta1.metrics.k8s.io")
}

logger.Info("Cleaning up some prometheus-adapter resources to reapply")
err = k8sClient.Clientset.CoreV1().Services("kube-system").Delete(ctx, "prometheus-adapter", metav1.DeleteOptions{})
if k8sErrors.IsNotFound(err) {
logger.Info("Service metrics-server not found; skipping...")
} else if err != nil {
return errors.Wrap(err, "failed to delete service metrics-server")
}
err = k8sClient.KubeagClientSet.ApiregistrationV1beta1().APIServices().Delete(ctx, "v1beta1.custom.metrics.k8s.io", metav1.DeleteOptions{})
if k8sErrors.IsNotFound(err) {
logger.Info("APIService v1beta1.metrics.k8s.io not found; skipping...")
} else if err != nil {
return errors.Wrap(err, "failed to delete APIService v1beta1.custom.metrics.k8s.io")
}

// TODO: determine if we want to hard-code the k8s resource objects in code.
// For now, we will ingest manifest files to deploy the mattermost operator.
files := []k8s.ManifestFile{
Expand Down Expand Up @@ -343,9 +329,6 @@ func (provisioner *KopsProvisioner) ProvisionCluster(cluster *model.Cluster, aws
}, {
Path: "manifests/metric-server/metric-server.yaml",
DeployNamespace: "kube-system",
}, {
Path: "manifests/prometheus-adapter/prometheus-adapter.yaml",
DeployNamespace: "kube-system",
},
}
err = k8sClient.CreateFromFiles(files)
Expand Down
319 changes: 0 additions & 319 deletions manifests/prometheus-adapter/prometheus-adapter.yaml

This file was deleted.

0 comments on commit ca36e01

Please sign in to comment.