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

Datatype for UID in fission-deployment-config.yaml #1232

Closed
msshroff opened this issue Jul 12, 2019 · 4 comments · Fixed by #1249

Comments

@msshroff
Copy link
Contributor

commented Jul 12, 2019

We are using specs for doing all the deployments on fission.
Building the specs on the CI server and then pushing the created specs on PROD for deployment.
We recreate the specs dynamically for every build, which obviously creates new UID in fission-deployment-config.yaml

With this approach when we deploy the incremental changes to PROD, it fails with duplicate resource error.

To overcome this, we are replacing the UID in fission-deployment-config.yaml with function name post specs are created.
In below example replacing uid: b16b8e4d-cb83-4197-8892-9cdaa7eb5a7f with uid: test-function-name

Currently this approach is working for us.
So just wanted to understand, if there are any validations for UID which may fail in future?
Any limitations?
Will this approach has any risks?

$ cat fission-deployment-config.yaml.original
apiVersion: fission.io/v1
kind: DeploymentConfig
name: customer-status-csm
uid: b16b8e4d-cb83-4197-8892-9cdaa7eb5a7f

$ cat fission-deployment-config.yaml
apiVersion: fission.io/v1
kind: DeploymentConfig
name: customer-status-csm
uid: test-function-name

@msshroff msshroff changed the title Datatype for uid in fission-deployment-config.yaml Datatype for UID in fission-deployment-config.yaml Jul 12, 2019

@life1347

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

I cannot guarantee the future things, but I think maybe we can provide a flag for the user to specify UID when doing fission spec init? @soamvasani ?

@life1347

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

@msshroff

BTW, may I ask how your workflow works?

Cause the original idea of fission spec is that spec will be stored in the version control system and users only need to push files that changed instead of recreating the whole spec. But from your use case, sounds like things are getting down in CI/CD pipeline and that's why you face this problem.

It would be great if you can share more information about how your pipeline works and other points that may help to increase the experience so that we can head in the right direction.

So far, I can only think of an issue that might be the problem: fission spec is not smart enough to update/remove spec files if there are any changes. For example,

$ fission spec init
$ fission env create --name java1 --image fission/jvm-env --builder fission/jvm-builder --spec
$ fission env create --name java1 --image fission/jvm-env --version 3 --poolsize 2 --spec
$ cat specs/env-java1.yaml
# shows duplicate envs
@msshroff

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2019

@life1347

Below is our high level workflow

  1. Fission function created by the developers, they will also create yaml for CM and Secret in corresponding directory structure
  2. The CI process dynamically generate the specs for each function (and changes needed for corresponding CM, Secrets, ht, mqt etc)
  3. CI Process packs created fission specs in the build process (point 2)
  4. CD process takes the build and runs "fission spec apply" for each deployment

Here only artifacts created in Point 1 are in version control system(GIT).
We are not putting specs in GIT as it need some info about ht, mqt, global CMs which developers do not know about.

@life1347

This comment has been minimized.

Copy link
Member

commented Sep 6, 2019

@msshroff This feature has been added to 1.5 which will be shipped this weekend. And thanks for the high-level workflow that's really helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.