Re-add missing quarks label to let quarks create the secret
and delete not needed function
@@ -93,6 +93,9 @@ func (w Workloads) apply(c *kubernetes.Cluster, ui *termui.UI, options kubernete
if err := c.CreateLabeledNamespace(WorkloadsDeploymentID); err != nil {
return err
}
+ if err := c.LabelNamespace(WorkloadsDeploymentID, "quarks.cloudfoundry.org/monitored", "quarks-secret"); err != nil {
+ return err
+ }
if err := w.createGiteaCredsSecret(c); err != nil {
return err
@@ -180,26 +183,6 @@ func (k Workloads) Upgrade(c *kubernetes.Cluster, ui *termui.UI, options kuberne
return nil
}
-func (w Workloads) createWorkloadsNamespace(c *kubernetes.Cluster, ui *termui.UI) error {
- if _, err := c.Kubectl.CoreV1().Namespaces().Create(
- context.Background(),
- &corev1.Namespace{
- ObjectMeta: metav1.ObjectMeta{
- Name: WorkloadsDeploymentID,
- Labels: map[string]string{
- "quarks.cloudfoundry.org/monitored": "quarks-secret",
- kubernetes.EpinioDeploymentLabelKey: kubernetes.EpinioDeploymentLabelValue,
- },
- },
- },
- metav1.CreateOptions{},
- ); err != nil {
- return nil
- }
-
- return nil
-}
-
func (w Workloads) deleteWorkloadsNamespace(c *kubernetes.Cluster, ui *termui.UI) error {
message := "Deleting Workloads namespace " + WorkloadsDeploymentID
_, err := helpers.WaitForCommandCompletion(ui, message,
