Skip to content

lagoon v2.0.0-rc.9

Compare
Choose a tag to compare
@github-actions github-actions released this 20 Aug 07:39
· 2637 commits to main since this release
7e953c6

This release is built on the https://github.com/uselagoon/lagoon-images/releases/tag/21.8.0 images

Facts, Tasks, and ProjectRouterPatterns, oh my 😌

Changes in this release

Upgrade instructions:

  1. Normal Helm Upgrade
  2. connect to api-db container: kubectl exec -it lagoon-core-api-db-0 sh
  3. run /rerun_initdb.sh
  4. Visit Keycloak UI as admin
  5. Navigate to Clients > lagoon-opendistro-security > Mappers > groups
  6. Replace script with:
var ArrayList = Java.type("java.util.ArrayList");
var groupsAndRoles = new ArrayList();
var forEach = Array.prototype.forEach;

// add all groups the user is part of
forEach.call(user.getGroups().toArray(), function(group) {
  // remove the group role suffixes
  //lets check if the group has a parent if this is a child
  if(group.getFirstAttribute("type") == "role-subgroup") {
    var parent = group.getParent();
    if(parent.getFirstAttribute("type") == "project-default-group") {
        var projectIds = parent.getFirstAttribute("lagoon-projects");
        if(projectIds !== null) {
            forEach.call(projectIds.split(","), function(g) {
              groupsAndRoles.add("p" + g);  
            });
            return;
        }
    }
  }
 
  var groupName = group.getName().replace(/-owner|-maintainer|-developer|-reporter|-guest/gi,"");
  groupsAndRoles.add(groupName);
  return;
});

// add all roles the user is part of
forEach.call(user.getRoleMappings().toArray(), function(role) {
   var roleName = role.getName();
   groupsAndRoles.add(roleName);
});

exports = groupsAndRoles;
  1. connect to api container: kubectl exec deploy/lagoon-core-api -it -- sh
  2. run yarn sync:opendistro-security