Comments (8)
I'm on board with just reporting the problem. Logs are good but some users may miss that when they're not getting the apps they expect, we could also however add a condition in ApplicationSet Status showing the issues encountered in reconciling which should help put it in-front of them where they would be likely to find it.
from applicationset.
Agree that we need to address the application name & label length issue, but I'd like to do it in such away that end-users (like me) can still provide their own templates for naming:
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-services-internal-ingress-nginx
namespace: argocd
spec:
generators:
- clusters:
selector:
matchExpressions: [...]
template:
metadata:
labels:
app: internal-ingress-nginx
cluster: '{{metadata.labels.cluster}}'
env: '{{metadata.labels.env}}'
org: '{{metadata.labels.org}}'
region: '{{metadata.labels.region}}'
name: 'cluster-services-iin-{{metadata.labels.org}}-{{metadata.labels.env}}-{{metadata.labels.region}}-{{metadata.labels.cluster}}'
namespace: argocd
spec: {...}
Note that I'd love to do something like '{{appset.name}}-{{metadata.labels.org}}-{{metadata.labels.env}}-{{metadata.labels.region}}-{{metadata.labels.cluster}}'
, but in this case had to truncate -internal-ingress-nginx
to -iin
because a number of my generated applications names would exceed the 63-character limit for labels.
from applicationset.
A proposal for discussion:
Assume we start with base name of {appsetname}-{generatoritemname}.
All generators would be required to provide some kind of a name for each matching Application. For clusters we could use the cluster name. For git discovery probably the matching folder name. For git files we require a name property in each list row. And similar for the ApplicationSet inline list items.
We use that full concatenated name if it's not too long, and if it is we fall back to something like this, which is how we solved this problem in one of my team's projects: https://github.com/openshift/hive/blob/master/pkg/apis/helpers/namer.go#L15
from applicationset.
I discovered the cluster generator was using the Secret name for the "name" templating, which can be quite long. (i.e. cluster-api.mycluster.mydomain.openshift.com-3927666468). I've opened #41 to fix this to use the name Argo has instead and that will help avoid this problem.
However it still is going to be quite possible to hit depending on the kubeconfig context name and template name.
from applicationset.
I discovered the cluster generator was using the Secret name for the "name" templating, which can be quite long. (i.e. cluster-api.mycluster.mydomain.openshift.com-3927666468). I've opened #41 to fix this to use the name Argo has instead and that will help avoid this problem.
My environment is exactly the opposite, with most Secret names being considerably shorter than the contexts. I know there's other work being done around cluster naming, though, so this strikes me as a reasonable change.
from applicationset.
Can't decide if there's anything we need to fix here, the name is in control of your applicationset, and what params you want to use. Should we leave it to users to manage the length limit? Or do we need to provide some protection from the easy to hit scenario where the name comes out too long?
from applicationset.
My inclination is to let users manage the length, but log if the rendered name exceeds 63 characters and is therefore unusable.
from applicationset.
Oh yeah, I like that!
from applicationset.
Related Issues (20)
- Webhooks: add support for Bitbucket HOT 3
- Github rate limit hit, even using `scmProvider.filters` HOT 1
- scmProvider Github filter combination (repositoryMatch + labelMatch) not generating apps HOT 1
- Merge generator where a generator can reference items of another one HOT 1
- FATA[0000] rpc error: code = Unimplemented desc = unknown service applicationset.ApplicationSetService HOT 2
- using helm and git repos inside ApplicationSet HOT 2
- git-generator-directory - doesn't apply value file
- docs: merge generator typo in example
- Feature Request: ApplicationSet Generators Should Support Jinja Conditionals HOT 1
- ApplicationSet not able to render helm chart when value is not defined in generator list
- Include SHA of test merge commit in PR generator for GitHub
- clusterDecisionResource example outdate ?
- Ability to provide multiple values files for Helm chart, using multiple sources HOT 3
- ApplicationSet fails silently
- Replace deprecated `set-output` command with environment file HOT 1
- How to set scmProvider filter based on repository group or path? HOT 1
- scmProvider for gitlab should export a Normalized version of the organization value HOT 2
- Plugin Generator throws `ApplicationSet: strict decoding error: unknown field "spec.generators[0].plugin"` HOT 4
- Application Set with Existing Project Issue HOT 1
- Matrix generator - Combine SCM and Git Generators, consume parameters from parent HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationset.