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

Add labels to kube-system and components namespaces #646

Merged
merged 9 commits into from
Aug 11, 2020

Commits on Aug 11, 2020

  1. k8sutil: Namespace struct for storing namespace metadata

    This commit adds a new Namespace struct that holds metadata regarding
    the Name, Labels and Annotatations specific to the Lokomotive
    installation or components installation.
    
    Signed-off-by: Imran Pochi <imran@kinvolk.io>
    ipochi committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    f288aac View commit details
    Browse the repository at this point in the history
  2. internal: add function to append name label to a given map

    Signed-off-by: Imran Pochi <imran@kinvolk.io>
    ipochi committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    46ce909 View commit details
    Browse the repository at this point in the history
  3. components: use k8sutil.Namespace struct for Metadata

    To allow components specify metadata(labels, annotations) for release
    namespace.
    
    Adds the labels that are required to be present on the components
    release namespace.
    
    Updates references where needed due to this change.
    
    Signed-off-by: Imran Pochi <imran@kinvolk.io>
    ipochi committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    acf1b5a View commit details
    Browse the repository at this point in the history
  4. k8sutil: Utility functions to create/update Namespace

    Move function `ensureNamespaceExists` to k8sutil package with new name
    CreateOrUpdateNamespace. This function creates/updates the namespace.
    
    Components use this function to create/update the release namespace.
    
    This function is also used to update the `kube-system` namespace after
    cluster installation.
    
    Includes another helper function in the `internal` package that merges
    two given maps. This is done to ensure that existing labels and
    annotations are retained and the new set of Labels/annotations overrides
    any existing ones.
    
    Signed-off-by: Imran Pochi <imran@kinvolk.io>
    ipochi committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    81117d6 View commit details
    Browse the repository at this point in the history
  5. components: add namespace label to release namespace.

    This commit adds the namespace label `lokomotive.kinvolk.io/name :
    <namespace_name>` to the release namespace.
    
    Signed-off-by: Imran Pochi <imran@kinvolk.io>
    ipochi committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    ea36299 View commit details
    Browse the repository at this point in the history
  6. cluster: update pre installed namespaces with labels

    This commit updates the pre-installed namespaces in the cluster to
    include the labels provided.
    
    Signed-off-by: Imran Pochi <imran@kinvolk.io>
    ipochi committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    667571d View commit details
    Browse the repository at this point in the history
  7. Add functionality to test namespace

    Signed-off-by: knrt10 <tripathi.kautilya@gmail.com>
    knrt10 authored and ipochi committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    b512bae View commit details
    Browse the repository at this point in the history
  8. test: use a consistent way to create test namespaces

    Signed-off-by: Imran Pochi <imran@kinvolk.io>
    ipochi committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    e187820 View commit details
    Browse the repository at this point in the history
  9. e2etest: Add e2e test to check if labels were added correctly

    Signed-off-by: Imran Pochi <imran@kinvolk.io>
    ipochi committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    a51b143 View commit details
    Browse the repository at this point in the history