Skip to content
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

Feature Request: Workload Runtime Security - installation wrapper script draft - Issue-#4115 #4148

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

adhishreekadam
Copy link

Pull Request Template

Description

Kube armor installation wrapper script draft

Fixes #4115

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Additional Context (Please include any Screenshots/gifs if relevant)

...

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have tagged the reviewers in a comment below incase my pull request is ready for a review
  • I have signed the commit message to agree to Developer Certificate of Origin (DCO) (to certify that you wrote or otherwise have the right to submit your contribution to the project.) by adding "--signoff" to my git commit command.

adhishreekadam and others added 20 commits July 25, 2024 17:57
Issue open-horizon#4115 - Workload Runtime Security - installation wrapper script 

Signed-off-by: Adhishree Kadam <[email protected]>
Issue open-horizon#4115- added steps 1 and 2

Signed-off-by: Adhishree Kadam <[email protected]>
Signed-off-by: Sze Yan <[email protected]>
Issue open-horizon#4115- added steps 3-6

Signed-off-by: Adhishree Kadam <[email protected]>
Signed-off-by: Sze Yan <[email protected]>
Signed-off-by: Adhishree Kadam <[email protected]>
Signed-off-by: adhishreekadam <[email protected]>
Signed-off-by: Sze Yan <[email protected]>
Signed-off-by: Adhishree Kadam <[email protected]>
Signed-off-by: Adhishree Kadam <[email protected]>
Signed-off-by: Adhishree Kadam <[email protected]>
Signed-off-by: Adhishree Kadam <[email protected]>
Signed-off-by: Adhishree Kadam <[email protected]>
Signed-off-by: Sze Yan <[email protected]>

# Step 13: Check if the operator is up in the cluster
echo "Checking if the operator is up in the cluster"
kubectl get pods -n openhorizon-agent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should not hard code that the namespace is openhorizon-agent. You should provide a way to provide an environment variable.. Something like
export AGENT_NAMESPACE=${AGENT_NAMESPACE:-openhorizon-agent}


# Step 2: Create a new working directory for a new horizon project
echo "Create a new working directory for a new horizon project"
hzn dev service new -V 1.0.0 -s kubearmor-operator -c cluster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are assuming the hzn executable is installed without checking for it.. I think you check for it and for jq


# Step 7: Publish operator service
echo "Publishing operator service"
hzn exchange service publish -f horizon/service.definition.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think you should use $SERVICE_DEF_JSON env variable on the publish command


# Step 11: Register your edge cluster with your new node policy
echo "Registering edge cluster with new node policy"
hznpod register -u $HZN_EXCHANGE_USER_AUTH
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is hznpod ? That needs to be defined somewhere

{ "name": "example", "value": "kubearmor-operator" }
]
}
EOF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is setting the property as a top level property. You should use the new deployment properties instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Workload Runtime Security - installation wrapper script
3 participants