Repository navigation
Update to make it work with Forge #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0206b95
config: forge: images: rename the files for more consistency
kpouget 883a412
README: update/fix the file locations
kpouget 30c7d27
manifests: ocpci-sa: role: allow the OCPCI-SA to delete fjobs
kpouget d25f00a
manifests: ocpci-sa: rbac-wip-ns: add RBAC for OCPI-CI sa to access p…
kpouget 5b51172
hacks: copy-kubeconfig-secrets-to-ns: script to migrate the kubeconfi…
kpouget 63d053b
config: forge: workflows/tasks: expose the ARTIFACT_DIR and FOURNOS_C…
kpouget ec5adbd
onfig: forge: workflows/tasks: use the long version of the bash safet…
kpouget ff9b75b
config: forge: workflows/tasks: don't source the env file
kpouget de9592c
manifests: ocpci-sa: allow the SA to get/list/log the pods
kpouget File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -o pipefail | ||
| set -o errexit | ||
| set -o nounset | ||
| set -o errtrace | ||
|
|
||
| # Use the first argument if provided, otherwise use the current project name | ||
| TARGET_NS=${1:-$(oc project -q)} | ||
| SOURCE_NS="psap-automation" | ||
|
|
||
| echo "Copying *-kubeconfig secrets from $SOURCE_NS to $TARGET_NS..." | ||
|
|
||
| # Loop through filtered secrets | ||
| for SECRET_NAME in $(oc get secrets -n $SOURCE_NS -o name | grep "\-kubeconfig"); do | ||
| # Extract from source and create in target | ||
| # 1. Fetch the secret in JSON | ||
| # 2. Use jq to delete all the "junk" metadata | ||
| # 3. Create it in the new namespace | ||
| oc get "$SECRET_NAME" -n "$SOURCE_NS" -o json | jq ' | ||
| del( | ||
| .metadata.namespace, | ||
| .metadata.uid, | ||
| .metadata.resourceVersion, | ||
| .metadata.creationTimestamp, | ||
| .metadata.managedFields, | ||
| .metadata.ownerReferences | ||
| )' | oc apply -n "$TARGET_NS" -f- | ||
| done | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
| name: ocpci-fournos-job-manager | ||
| namespace: psap-automation-wip | ||
| rules: | ||
| - apiGroups: ["fournos.dev"] | ||
| resources: ["fournosjobs"] | ||
| verbs: ["create", "get", "list", "watch", "delete"] | ||
| - apiGroups: [""] | ||
| resources: ["pods"] | ||
| verbs: ["get", "list"] | ||
| - apiGroups: [""] | ||
| resources: ["pods/log"] | ||
| verbs: ["get"] | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| name: ocpci-fournos-job-manager | ||
| namespace: psap-automation-wip | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: ocpci | ||
| namespace: psap-automation # This points back to the original namespace | ||
| roleRef: | ||
| kind: Role | ||
| name: ocpci-fournos-job-manager | ||
| apiGroup: rbac.authorization.k8s.io |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.