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

Make it possible to add annotations to the keys secret #3484

Open
wants to merge 5 commits into
base: v4.x
Choose a base branch
from

Conversation

sdahlbac
Copy link
Contributor

Add command line option --keys-secret-annotations for specifying the annotations to be added to the keys secret when doing func kubernetes deploy

Tested manually using

--keys-secret-annotations reflector.v1.k8s.emberstack.com/reflection-allowed=true,reflector.v1.k8s.emberstack.com/reflection-auto-enabled=true,reflector.v1.k8s.emberstack.com/reflection-auto-namespaces=default

which renders the relevant bit of the keys secret like follows

...
kind: Secret
metadata:
  name: <name>
  annotations:
    reflector.v1.k8s.emberstack.com/reflection-allowed: "true"
    reflector.v1.k8s.emberstack.com/reflection-auto-enabled: "true"
    reflector.v1.k8s.emberstack.com/reflection-auto-namespaces: default

Issue describing the changes in this PR

resolves #3483

Pull request checklist

  • My changes do not require documentation changes I do not know, does it?
    • Otherwise: Documentation issue linked to PR
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

I have not ran nor added tests as I have a mac.

@sdahlbac
Copy link
Contributor Author

@microsoft-github-policy-service agree

@liliankasem
Copy link
Member

/azp run coretools.public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

liliankasem
liliankasem previously approved these changes Oct 15, 2024
@liliankasem liliankasem self-requested a review October 15, 2024 20:14
@liliankasem
Copy link
Member

lgtm but I don't want to merge this in without tests; you should be able to write unit tests on a mac (it's my primary device as well). If you're not longer able to contribute to this PR, I can speak to the team about getting this reassigned!

@sdahlbac
Copy link
Contributor Author

@liliankasem
Copy link
Member

Is https://github.com/Azure/azure-functions-core-tools/blob/v4.x/CONTRIBUTING.md#running-the-test-suite incorrect then?

I believe it is outdated. It was written 7 years ago. My team just got ownership of this repo so we can work on updating this outdated information, but this might take some time given other priorities. You should be able to run tests like any normal c# project

@sdahlbac
Copy link
Contributor Author

@liliankasem I just tried getting the tests to run, or even cd test/Azure.Functions.Cli.Tests; dotnet build:

Azure.Functions.Cli.Tests.csproj contains

  <Target Name="CopyInProc8" AfterTargets="Build" Condition="'$(TargetFramework)'=='net6.0'">
    <Exec Command="xcopy /Y /I /E &quot;$(MSBuildThisFileDirectory)..\..\src\Azure.Functions.Cli\bin\$(Configuration)\$(TargetFramework)\in-proc8\*&quot; &quot;$(OutDir)in-proc8\&quot;" />
  </Target>

which for obvious? reasons is not really working on OSX

making the tests work at all seems a bit out of scope for this PR IMO.

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.

Add possibility to add annotations when doing func kubernetes deploy
2 participants